From 527a47c7efbfd09f9e1fc372d8a37c6a928a7637 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 5 Mar 2018 13:39:52 -0800 Subject: [PATCH] ecore: optimize efl_model_list_value_get by using eina_list_nth_list. --- src/lib/ecore/ecore_internal.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore/ecore_internal.h b/src/lib/ecore/ecore_internal.h index 5bb5754..c585f40 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, 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); -- 2.7.4