projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9afcb93
)
eet dict - remove redundant check of len, str and possibly strcmp
author
Carsten Haitzler (Rasterman)
<raster@rasterman.com>
Tue, 20 Nov 2018 16:57:24 +0000
(16:57 +0000)
committer
Hermet Park
<hermetpark@gmail.com>
Wed, 5 Dec 2018 05:21:28 +0000
(14:21 +0900)
aim for small speedups.
src/lib/eet/eet_dictionary.c
patch
|
blob
|
history
diff --git
a/src/lib/eet/eet_dictionary.c
b/src/lib/eet/eet_dictionary.c
index
c8ea016
..
acff624
100644
(file)
--- 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);