summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-02-24 22:37:53 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-24 22:37:53 +0100
commit6d6fa6b7150a353ce2b88e9a9f71b6310423d310 (patch)
tree8f1f26073ff702d018a7609368582453f8815e66 /src/lib/edje
parenta08c59eacf8b61dd4897e1aabab0130eb17b48b0 (diff)
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.
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_textblock_styles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/edje/edje_textblock_styles.c b/src/lib/edje/edje_textblock_styles.c
index 9e65253abd..c496ce2ba4 100644
--- a/src/lib/edje/edje_textblock_styles.c
+++ b/src/lib/edje/edje_textblock_styles.c
@@ -278,7 +278,7 @@ _edje_textblock_style_search(Edje *ed, const char *style)
278 EINA_LIST_FOREACH(ed->file->styles, l, stl) 278 EINA_LIST_FOREACH(ed->file->styles, l, stl)
279 { 279 {
280 if ((stl->name) && 280 if ((stl->name) &&
281 (!strcmp(stl->name, style))) break; 281 (stl->name == style || !strcmp(stl->name, style))) break;
282 stl = NULL; 282 stl = NULL;
283 } 283 }
284 284