efl_ui_stack: remove unnecessary condition of EINA_INLIST_CONTAINER_GET return value

Summary:
Becase EINA_INLIST_CONTAINER_GET always return true, it doesn't need to check
whether return value is null.

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7112
This commit is contained in:
Yeongjong Lee 2018-09-27 13:57:33 +09:00 committed by Hermet Park
parent e6bc4d254e
commit 820dcb9cd9
1 changed files with 153 additions and 168 deletions

View File

@ -163,8 +163,6 @@ _efl_ui_stack_push(Eo *obj, Efl_Ui_Stack_Data *pd, Eo *content)
/* Apply transition to top content.
* Hide top content with animation. */
if (top_cd)
{
Eo *top_content = top_cd->content;
Efl_Canvas_Animation *orig_hide_anim =
@ -226,7 +224,6 @@ _efl_ui_stack_push(Eo *obj, Efl_Ui_Stack_Data *pd, Eo *content)
efl_gfx_entity_visible_set(top_content, EINA_FALSE);
}
}
/* Prepare transition for new content.
* Hide new content without animation. */
@ -298,7 +295,6 @@ _efl_ui_stack_pop(Eo *obj, Efl_Ui_Stack_Data *pd)
}
Content_Data *top_cd = EINA_INLIST_CONTAINER_GET(pd->stack->last, Content_Data);
if (!top_cd) return NULL;
pd->stack = eina_inlist_remove(pd->stack, EINA_INLIST_GET(top_cd));
@ -380,8 +376,6 @@ _efl_ui_stack_pop(Eo *obj, Efl_Ui_Stack_Data *pd)
{
Content_Data *prev_cd = EINA_INLIST_CONTAINER_GET(pd->stack->last,
Content_Data);
if (prev_cd)
{
Eo *prev_content = prev_cd->content;
//If content is being pushed now, then finish current animation.
@ -431,8 +425,6 @@ _efl_ui_stack_pop(Eo *obj, Efl_Ui_Stack_Data *pd)
* setting animation and efl_gfx_entity_visible_set() is not called. */
efl_ui_widget_resize_object_set(obj, prev_content);
}
}
}
return NULL;
@ -734,8 +726,6 @@ _efl_ui_stack_remove(Eo *obj, Efl_Ui_Stack_Data *pd, Eo *content)
{
Content_Data *new_top_cd = EINA_INLIST_CONTAINER_GET(pd->stack->last,
Content_Data);
if (new_top_cd)
{
//Loaded Event
Efl_Ui_Stack_Event_Loaded loaded_info;
loaded_info.content = new_top_cd->content;
@ -774,7 +764,6 @@ _efl_ui_stack_remove(Eo *obj, Efl_Ui_Stack_Data *pd, Eo *content)
&activated_info);
}
}
}
}
EOLIAN static void
@ -830,8 +819,6 @@ _efl_ui_stack_remove_at(Eo *obj, Efl_Ui_Stack_Data *pd,
{
Content_Data *new_top_cd = EINA_INLIST_CONTAINER_GET(pd->stack->last,
Content_Data);
if (new_top_cd)
{
//Loaded Event
Efl_Ui_Stack_Event_Loaded loaded_info;
loaded_info.content = new_top_cd->content;
@ -870,7 +857,6 @@ _efl_ui_stack_remove_at(Eo *obj, Efl_Ui_Stack_Data *pd,
&activated_info);
}
}
}
}
EOLIAN static int
@ -943,7 +929,6 @@ _efl_ui_stack_top(Eo *obj EINA_UNUSED, Efl_Ui_Stack_Data *pd)
if (!pd->stack) return NULL;
Content_Data *cd = EINA_INLIST_CONTAINER_GET(pd->stack->last, Content_Data);
if (!cd) return NULL;
return cd->content;
}