elm/datetime: default case for default value

Summary:
This will eliminate unnecessary initialization of local variable in case the type is not EFL_UI_CLOCK_TYPE_YEAR.
Also, ELM_DATETIME_YEAR case is merged with the default case.

Reviewers: singh.amitesh, cedric

Subscribers: minkyu, jpeg

Differential Revision: https://phab.enlightenment.org/D4409

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
Shuhrat Dehkanov 2016-11-17 16:15:35 -08:00 committed by Cedric Bail
parent 38788e7787
commit ec12506a88
1 changed files with 3 additions and 5 deletions

View File

@ -41,13 +41,10 @@ elm_datetime_format_get(const Evas_Object *obj)
static Efl_Ui_Clock_Type
adjust_field_type(Elm_Datetime_Field_Type type)
{
Efl_Ui_Clock_Type ctype = EFL_UI_CLOCK_TYPE_YEAR;
Efl_Ui_Clock_Type ctype;
switch(type)
{
case ELM_DATETIME_YEAR:
ctype = EFL_UI_CLOCK_TYPE_YEAR;
break;
case ELM_DATETIME_MONTH:
ctype = EFL_UI_CLOCK_TYPE_MONTH;
break;
@ -63,8 +60,9 @@ adjust_field_type(Elm_Datetime_Field_Type type)
case ELM_DATETIME_AMPM:
ctype = EFL_UI_CLOCK_TYPE_AMPM;
break;
case ELM_DATETIME_YEAR:
default:
;
ctype = EFL_UI_CLOCK_TYPE_YEAR;
}
return ctype;