forked from enlightenment/efl
eet dict - remove redundant check of len, str and possibly strcmp
aim for small speedups.
This commit is contained in:
parent
c0d6cbab97
commit
61109729fa
|
@ -101,16 +101,10 @@ eet_dictionary_string_add(Eet_Dictionary *ed,
|
||||||
eina_rwlock_take_read(&ed->rwlock);
|
eina_rwlock_take_read(&ed->rwlock);
|
||||||
|
|
||||||
idx = _eet_dictionary_lookup(ed, string, len, hash, &pidx);
|
idx = _eet_dictionary_lookup(ed, string, len, hash, &pidx);
|
||||||
|
|
||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
{
|
{
|
||||||
if (ed->all[idx].str &&
|
eina_rwlock_release(&ed->rwlock);
|
||||||
((ed->all[idx].str == string) ||
|
return idx;
|
||||||
(!strcmp(ed->all[idx].str, string))))
|
|
||||||
{
|
|
||||||
eina_rwlock_release(&ed->rwlock);
|
|
||||||
return idx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
str = eina_stringshare_add(string);
|
str = eina_stringshare_add(string);
|
||||||
|
|
Loading…
Reference in New Issue