Summary:
Now the developer has to iterate the whole list to find the
index of the first occurence of the data.
I see that it is possible to get the index of the item for
the genlist widget, but for the eina_list not.
With these APIs it will be easier to implement *index_get
functions for the rest of widgets which contain items (Elm_List,
Elm_Ctxpopup etc.).
These functions returns the index of the given data or node in the eina_list.
Reviewers: Hermet, cedric
Subscribers: raster, cedric
Differential Revision: https://phab.enlightenment.org/D2189
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
if (cmp == 0) - in false branch, cmp can not be equal to 0
else if (cmp < 0) - in false branch, cmp is atleast 1.
else if (cmp > 0) - it is abvious that cmp > 0.
Reviewers: cedric, seoz, raster
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D1502
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
If we have a valid but empty, n = 0, list we never enter the loop
and shuffled_last might still be NULL. Avoid this case by checking
explicitly for n = 0 before.