e_comp_object: Remove unreachable code 60/293960/1 accepted/tizen/unified/20230612.072228
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 8 Jun 2023 00:32:49 +0000 (09:32 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 9 Jun 2023 06:01:14 +0000 (15:01 +0900)
The while statement can be removed because it has been excuted once
because of the break at the end of the loop.
Plus, this patch also removes meaningless condition check whether `ok`
is true.

Change-Id: I736cd2046d142c8cea15966a586cd1d8729e9781

src/bin/e_comp_object.c

index d538099..50d1b4c 100644 (file)
@@ -3737,21 +3737,13 @@ e_comp_object_util_add(Evas_Object *obj)
    if (skip)
      evas_object_data_set(o, "comp_object_skip", (void*)1);
 
-   while (!ok)
+   if (conf->shadow_style)
      {
-        if (conf->shadow_style)
-          {
-             if (!ok)
-               {
-                  snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
-                  ok = e_theme_edje_object_set(o, "base/theme/comp", buf);
-               }
-             if (ok) break;
-          }
-        if (!ok)
-          ok = e_theme_edje_object_set(o, "base/theme/comp", "e/comp/frame/default");
-        break;
+        snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
+        ok = e_theme_edje_object_set(o, "base/theme/comp", buf);
      }
+   if (!ok)
+     e_theme_edje_object_set(o, "base/theme/comp", "e/comp/frame/default");
    if (e_util_strcmp(evas_object_type_get(obj), "edje") || (!edje_object_data_get(obj, "noshadow")))
      edje_object_signal_emit(o, "e,state,shadow,on", "e");
    else