summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-20 16:57:24 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-21 13:37:16 +0000
commit61109729fada2c26bd713a1f105702c03da3d2b7 (patch)
tree970bd98ddb47dcdc165fb32a2a170d44c0169a45 /src/lib/eet
parentc0d6cbab97a1fac072aa1a7101165d9db25903a7 (diff)
eet dict - remove redundant check of len, str and possibly strcmp
aim for small speedups.
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_dictionary.c10
1 files 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,
101 eina_rwlock_take_read(&ed->rwlock); 101 eina_rwlock_take_read(&ed->rwlock);
102 102
103 idx = _eet_dictionary_lookup(ed, string, len, hash, &pidx); 103 idx = _eet_dictionary_lookup(ed, string, len, hash, &pidx);
104
105 if (idx != -1) 104 if (idx != -1)
106 { 105 {
107 if (ed->all[idx].str && 106 eina_rwlock_release(&ed->rwlock);
108 ((ed->all[idx].str == string) || 107 return idx;
109 (!strcmp(ed->all[idx].str, string))))
110 {
111 eina_rwlock_release(&ed->rwlock);
112 return idx;
113 }
114 } 108 }
115 109
116 str = eina_stringshare_add(string); 110 str = eina_stringshare_add(string);