From 64252094812a27454911966d7b7bac9ec89aae20 Mon Sep 17 00:00:00 2001 From: tsauerbeck Date: Thu, 31 Mar 2005 17:39:31 +0000 Subject: [PATCH] optimization. to check whether a string is empty (len == 0), we don't need to run strlen, checking whether the first char is the terminating NUL is enough SVN revision: 14049 --- legacy/edje/src/lib/edje_calc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c index fbb55f585b..4b1f900457 100644 --- a/legacy/edje/src/lib/edje_calc.c +++ b/legacy/edje/src/lib/edje_calc.c @@ -465,7 +465,7 @@ _edje_part_recalc_single(Edje *ed, if (ep->text.source) { if ((ep->text.source->chosen_description->text.text_class) && - (strlen(ep->text.source->chosen_description->text.text_class) > 0)) + (*ep->text.source->chosen_description->text.text_class)) { Edje_Text_Class *tc; @@ -479,8 +479,7 @@ _edje_part_recalc_single(Edje *ed, } else { - if ((chosen_desc->text.text_class) && - (strlen(chosen_desc->text.text_class) > 0)) + if ((chosen_desc->text.text_class) && (*chosen_desc->text.text_class)) { Edje_Text_Class *tc; @@ -759,7 +758,7 @@ _edje_part_recalc_single(Edje *ed, params->color3.b = desc->color3.b; params->color3.a = desc->color3.a; - if ((desc->color_class) && (strlen(desc->color_class) > 0)) + if ((desc->color_class) && (*desc->color_class)) { Edje_Color_Class *cc;