ecore: optimize efl_model_list_value_get by using eina_list_nth_list.
authorCedric BAIL <cedric@osg.samsung.com>
Mon, 5 Mar 2018 21:39:52 +0000 (13:39 -0800)
committerWonki Kim <wonki_.kim@samsung.com>
Thu, 31 May 2018 07:00:47 +0000 (16:00 +0900)
src/lib/ecore/ecore_internal.h

index 5bb5754..c585f40 100644 (file)
@@ -42,15 +42,12 @@ efl_model_list_value_get(Eina_List *childrens,
 
    eina_value_array_setup(&v, EINA_VALUE_TYPE_OBJECT, eina_list_count(childrens));
 
+   childrens = eina_list_nth_list(childrens, start);
+
    EINA_LIST_FOREACH(childrens, l, child)
      {
-        if (start != 0)
-          {
-             start--;
-             continue;
-          }
         if (count == 0)
-          continue;
+          break;
         count--;
 
         eina_value_array_append(&v, child);