eet dict - remove redundant check of len, str and possibly strcmp

aim for small speedups.
This commit is contained in:
Carsten Haitzler 2018-11-20 16:57:24 +00:00
parent c0d6cbab97
commit 61109729fa
1 changed files with 2 additions and 8 deletions

View File

@ -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);