Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_list.c Log Message: save some loops in _ecore_list_goto_index() =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_list.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- ecore_list.c 28 Dec 2006 10:19:34 -0000 1.26 +++ ecore_list.c 9 Jan 2007 21:21:29 -0000 1.27 @@ -737,9 +737,15 @@ if (index > ecore_list_nodes(list) || index < 0) return NULL; - _ecore_list_goto_first(list); + if (index < list->index) + { + _ecore_list_goto_first(list); + i = 0; + } + else + i = list->index; - for (i = 0; i < index && _ecore_list_next(list); i++); + for (; i < index && _ecore_list_next(list); i++); if (i >= list->nodes) return NULL; ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs