edje: optimize style matching.

Most of the time the style string will come from the eet file directly, so
thanks to the dictionnary build in they should be pointing to the same string.
We still need to keep strcmp case for Edje_Edit case, but that shouldn't be
a real issue as the worst case is when it match. When it doesn't match strcmp
should return quite fast on average.
This commit is contained in:
Cedric BAIL 2015-02-24 22:37:53 +01:00
parent a08c59eacf
commit 6d6fa6b715
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ _edje_textblock_style_search(Edje *ed, const char *style)
EINA_LIST_FOREACH(ed->file->styles, l, stl)
{
if ((stl->name) &&
(!strcmp(stl->name, style))) break;
(stl->name == style || !strcmp(stl->name, style))) break;
stl = NULL;
}