eunue pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f2ce7764133cb423645f9c20f1ff97fe409754bd
commit f2ce7764133cb423645f9c20f1ff97fe409754bd Author: Jaeun Choi <jaeun12.c...@samsung.com> Date: Thu Dec 13 21:13:37 2018 +0900 efl_page_transition_scroll: removed unnecesary variable --- src/lib/elementary/efl_page_transition_scroll.c | 31 +++++++++++-------------- src/lib/elementary/efl_page_transition_scroll.h | 1 - 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c index d26e8449a3..64e6438710 100644 --- a/src/lib/elementary/efl_page_transition_scroll.c +++ b/src/lib/elementary/efl_page_transition_scroll.c @@ -96,25 +96,24 @@ _content_show(Efl_Page_Transition_Scroll_Data *pd, EINA_LIST_FOREACH(pd->page_infos, list, pi) { - if (pi->vis_page) - { - tmp_id = (curr_page + pi->pos + cnt) % cnt; + if ((pi == pd->head) || (pi == pd->tail)) continue; - if ((spd->loop == EFL_UI_PAGER_LOOP_DISABLED) - && ((pi->pos) * (tmp_id - curr_page) < 0)) continue; + tmp_id = (curr_page + pi->pos + cnt) % cnt; - tmp = efl_pack_content_get(spd->pager.obj, tmp_id); - if (tmp) - { - efl_canvas_object_clip_set(pi->obj, pd->foreclip); + if ((spd->loop == EFL_UI_PAGER_LOOP_DISABLED) + && ((pi->pos) * (tmp_id - curr_page) < 0)) continue; - efl_pack(pi->obj, tmp); - efl_canvas_object_clip_set(tmp, pd->foreclip); + tmp = efl_pack_content_get(spd->pager.obj, tmp_id); + if (tmp) + { + efl_canvas_object_clip_set(pi->obj, pd->foreclip); - pi->content_num = tmp_id; - pi->content = tmp; - pi->visible = EINA_TRUE; - } + efl_pack(pi->obj, tmp); + efl_canvas_object_clip_set(tmp, pd->foreclip); + + pi->content_num = tmp_id; + pi->content = tmp; + pi->visible = EINA_TRUE; } } } @@ -165,13 +164,11 @@ _page_info_geometry_change(Efl_Page_Transition_Scroll_Data *pd, if (eina_rectangles_intersect(&pi->geometry, &pd->viewport) && ((pi->id != 0) && (pi->id != (pd->page_info_num - 1)))) { - pi->vis_page = EINA_TRUE; pi->visible = EINA_TRUE; efl_canvas_object_clip_set(pi->obj, pd->foreclip); } else { - pi->vis_page = EINA_FALSE; pi->visible = EINA_FALSE; efl_canvas_object_clip_set(pi->obj, pd->backclip); } diff --git a/src/lib/elementary/efl_page_transition_scroll.h b/src/lib/elementary/efl_page_transition_scroll.h index b4203d7706..adec47d3cd 100644 --- a/src/lib/elementary/efl_page_transition_scroll.h +++ b/src/lib/elementary/efl_page_transition_scroll.h @@ -66,7 +66,6 @@ typedef struct _Page_Info struct _Page_Info *prev, *next; Eina_Bool visible; - Eina_Bool vis_page; } Page_Info; --