raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=61109729fada2c26bd713a1f105702c03da3d2b7

commit 61109729fada2c26bd713a1f105702c03da3d2b7
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue Nov 20 16:57:24 2018 +0000

    eet dict - remove redundant check of len, str and possibly strcmp
    
    aim for small speedups.
---
 src/lib/eet/eet_dictionary.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/eet/eet_dictionary.c b/src/lib/eet/eet_dictionary.c
index c8ea01642b..acff624f1c 100644
--- a/src/lib/eet/eet_dictionary.c
+++ b/src/lib/eet/eet_dictionary.c
@@ -101,16 +101,10 @@ eet_dictionary_string_add(Eet_Dictionary *ed,
    eina_rwlock_take_read(&ed->rwlock);
 
    idx = _eet_dictionary_lookup(ed, string, len, hash, &pidx);
-
    if (idx != -1)
      {
-        if (ed->all[idx].str && 
-            ((ed->all[idx].str == string) ||
-                (!strcmp(ed->all[idx].str, string))))
-         {
-             eina_rwlock_release(&ed->rwlock);
-           return idx;
-         }
+        eina_rwlock_release(&ed->rwlock);
+        return idx;
      }
 
    str = eina_stringshare_add(string);

-- 


Reply via email to