From c4bb22c259c08653a53e2b940b77d3bfa9c64007 Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 17 Jan 2012 09:15:31 +0000 Subject: [PATCH] we can optimize matching by breaking loop when match becomes 0 :) git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@67267 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 8c530b4..ae5425c 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -4738,7 +4738,11 @@ _escaped_char_match(const char *s, int *adv) while ((*mc) && (*sc)) { if ((unsigned char)*sc < (unsigned char)*mc) return NULL; - if (*sc != *mc) match = 0; + if (*sc != *mc) + { + match = 0; + break; + } mc++; sc++; } -- 2.7.4