From: Jaehwan Kim Date: Wed, 9 Jan 2013 10:32:52 +0000 (+0000) Subject: Fix Logically dead code X-Git-Tag: upstream/1.20.0~7116^2~14^2~5318 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbd2af0ca17374857a8df5c3b3242424d1c24f38;p=platform%2Fupstream%2Fefl.git Fix Logically dead code SVN revision: 82450 --- diff --git a/legacy/elementary/src/lib/els_box.c b/legacy/elementary/src/lib/els_box.c index a35e1d7..aa30a24 100644 --- a/legacy/elementary/src/lib/els_box.c +++ b/legacy/elementary/src/lib/els_box.c @@ -8,6 +8,7 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int horiz Evas_Coord minw, minh, mnw, mnh, maxw, maxh; const Eina_List *l; Evas_Object_Box_Option *opt; + Eina_Bool max = EINA_TRUE; int c; minw = 0; @@ -67,19 +68,27 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int horiz evas_object_size_hint_max_get(opt->obj, &mnw, &mnh); if (horizontal) { - if (mnw < 0) maxw = -1; - if (maxw != -1) + if (mnw < 0) { - if (maxw > mnw) maxw = mnw; + maxw = -1; + max = EINA_FALSE; + } + if (max) + { + if (maxh > mnh) maxh = mnh; maxw += mnw; } } else { - if (mnh < 0) maxh = -1; - if (maxh != -1) + if (mnh < 0) { - if (maxh > mnh) maxh = mnh; + maxh = -1; + max = EINA_FALSE; + } + if (max) + { + if (maxw > mnw) maxw = mnw; maxh += mnh; } }