From fbd2af0ca17374857a8df5c3b3242424d1c24f38 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Wed, 9 Jan 2013 10:32:52 +0000 Subject: [PATCH] Fix Logically dead code SVN revision: 82450 --- legacy/elementary/src/lib/els_box.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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; } } -- 2.7.4