From: Cedric BAIL Date: Mon, 5 Mar 2018 21:39:52 +0000 (-0800) Subject: ecore: optimize efl_model_list_value_get by using eina_list_nth_list. X-Git-Tag: upstream/1.21.0~879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=527a47c7efbfd09f9e1fc372d8a37c6a928a7637;p=platform%2Fupstream%2Fefl.git ecore: optimize efl_model_list_value_get by using eina_list_nth_list. --- 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);