From 42672a1eb40b9bbeb6e47d6ad54d0efff49de843 Mon Sep 17 00:00:00 2001 From: seoz Date: Fri, 21 Oct 2011 17:06:46 +0000 Subject: [PATCH] elm genlist/gengrid: No need to call elm_widget_data_get() if we know it. it->wd is a widget data. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64263 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_gengrid.c | 4 ++-- src/lib/elm_genlist.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 7dd20ac..f7de359 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2857,7 +2857,7 @@ EAPI void elm_gengrid_item_show(Elm_Gen_Item *it) { ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it); - Widget_Data *wd = elm_widget_data_get(WIDGET(it)); + Widget_Data *wd = it->wd; Evas_Coord minx = 0, miny = 0; if (!wd) return; @@ -2885,7 +2885,7 @@ elm_gengrid_item_bring_in(Elm_Gen_Item *it) if (it->delete_me) return; Evas_Coord minx = 0, miny = 0; - Widget_Data *wd = elm_widget_data_get(WIDGET(it)); + Widget_Data *wd = it->wd; if (!wd) return; _pan_min_get(wd->pan_smart, &minx, &miny); diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 6942f5c..aa42052 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -3975,7 +3975,7 @@ elm_genlist_item_selected_set(Elm_Gen_Item *it, Eina_Bool selected) { ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it); - Widget_Data *wd = elm_widget_data_get(WIDGET(it)); + Widget_Data *wd = it->wd; if (!wd) return; if ((it->delete_me) || (it->disabled)) return; selected = !!selected; -- 2.7.4