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
This commit is contained in:
tsauerbeck 2005-03-31 17:39:31 +00:00 committed by tsauerbeck
parent f06dec0f74
commit 6425209481
1 changed files with 3 additions and 4 deletions

View File

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