- change find to leave the list pointing to the found item instead of the

next item in the list


SVN revision: 27899
This commit is contained in:
Dan Sinclair 2007-01-10 21:56:11 +00:00 committed by Dan Sinclair
parent 43bd78a18f
commit c826f19dce
1 changed files with 4 additions and 1 deletions

View File

@ -1051,8 +1051,11 @@ _ecore_list_find(Ecore_List *list, Ecore_Compare_Cb function, const void *user_d
if (!list || !function) return NULL;
_ecore_list_goto_first(list);
while ((value = _ecore_list_next(list)) != NULL)
while ((value = _ecore_list_current(list)) != NULL)
{
if (!function(value, user_data)) return value;
ecore_list_next(list);
}
return NULL;
}