summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_internal.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-05 13:39:52 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commitd895527bd5834da97d3fadd51ded327be1136dc3 (patch)
treebac5620d87c225a6854fcedbaf5e8b96f0c1262e /src/lib/ecore/ecore_internal.h
parent5bfdc435c77cf5768437d7a42323e97f601ffa38 (diff)
ecore: optimize efl_model_list_value_get by using eina_list_nth_list.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/ecore_internal.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/ecore/ecore_internal.h b/src/lib/ecore/ecore_internal.h
index 5bb5754f1c..c585f40aa4 100644
--- a/src/lib/ecore/ecore_internal.h
+++ b/src/lib/ecore/ecore_internal.h
@@ -42,15 +42,12 @@ efl_model_list_value_get(Eina_List *childrens,
42 42
43 eina_value_array_setup(&v, EINA_VALUE_TYPE_OBJECT, eina_list_count(childrens)); 43 eina_value_array_setup(&v, EINA_VALUE_TYPE_OBJECT, eina_list_count(childrens));
44 44
45 childrens = eina_list_nth_list(childrens, start);
46
45 EINA_LIST_FOREACH(childrens, l, child) 47 EINA_LIST_FOREACH(childrens, l, child)
46 { 48 {
47 if (start != 0)
48 {
49 start--;
50 continue;
51 }
52 if (count == 0) 49 if (count == 0)
53 continue; 50 break;
54 count--; 51 count--;
55 52
56 eina_value_array_append(&v, child); 53 eina_value_array_append(&v, child);