fix compilation and warnings on gcc compiler 93/111493/2 submit/tizen/20170120.151853 submit/tizen/20170125.105506 submit/tizen/20170130.165532
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 20 Jan 2017 13:35:18 +0000 (14:35 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 20 Jan 2017 14:35:39 +0000 (06:35 -0800)
Change-Id: I2a2ea0fc05578d8e9d460ddfa314031db45bd9a1

clock/src/View/AlarmView.cpp
clock/src/View/DeleteAlarmView.cpp
clock/src/View/EditAlarmView.cpp
clock/src/View/StopWatchView.cpp
clock/src/View/WorldClockDeleteItemsView.cpp
clock/src/View/WorldClockReorderView.cpp
clock/src/View/WorldClockView.cpp

index bfb5f72..698f728 100644 (file)
@@ -49,10 +49,15 @@ struct ItemData {
 };
 
 Elm_Genlist_Item_Class AlarmView::alarm_itc = {
-       .item_style = "alarm",
-       .func.content_get = AlarmView::ContentGet,
-       .func.text_get = AlarmView::TextGet,
-       .func.del = AlarmView::Del,
+       0, 0, EINA_FALSE, EINA_TRUE,
+       "alarm", nullptr, nullptr,
+       { AlarmView::TextGet,
+         AlarmView::ContentGet,
+         nullptr,
+         AlarmView::Del,
+         nullptr,
+         nullptr,
+       }
 };
 
 void AlarmView::ItemClicked(void *data, Evas_Object *obj, void *info)
@@ -155,7 +160,7 @@ void AlarmView::Del(void *data, Evas_Object *obj)
        delete id;
 }
 
-AlarmView::AlarmView(ui::IView &main)
+AlarmView::AlarmView(ui::IView &main) : label_(nullptr)
 {
        /* Base Layout */
        content_ = elm_layout_add(main.GetEvasObject());
index 1ba05d8..1c3bfb2 100644 (file)
@@ -97,7 +97,7 @@ void DeleteAlarmView::ItemSelectToggle(void *data, Evas_Object *obj, void *event
                id->instance->all_selected_ = false;
                elm_check_state_set(id->instance->all_selected_check_, id->instance->all_selected_);
        } else {
-               int items_count = elm_genlist_items_count(id->instance->content_) - 1;
+               unsigned int items_count = elm_genlist_items_count(id->instance->content_) - 1;
                std::vector<int> ids = id->instance->GetSelectedItems();
                if (items_count == ids.size()) {
                        id->instance->all_selected_ = true;
index 83abfc5..06e8c07 100644 (file)
@@ -65,7 +65,7 @@ static std::string join(std::vector<std::string> &array, std::string delimiter)
 {
        std::string acc;
 
-       for (int i = 0; i < array.size(); i++) {
+       for (unsigned int i = 0; i < array.size(); i++) {
                if (i != 0)
                        acc.append(delimiter);
                acc.append(array[i]);
index 0906662..e4f323e 100644 (file)
@@ -28,8 +28,11 @@ const char *StopWatchView::EDJE_FILE = "edje/StopWatch.edj";
 const char *StopWatchView::GROUP = "StopWatch";
 
 const Elm_Genlist_Item_Class StopWatchView::list_itc = {
-       .item_style = "lap",
-       .func.text_get = GetListText,
+       0, 0, EINA_FALSE, EINA_TRUE,
+       "lap", nullptr, nullptr,
+       { GetListText,
+         nullptr, nullptr, nullptr, nullptr, nullptr,
+       }
 };
 
 StopWatchView::StopWatchView(ui::IView &main)
index c8da4ea..ce3243c 100644 (file)
@@ -60,10 +60,15 @@ struct LocationDeleteItemData {
 /* Delete list View */
 
 Elm_Genlist_Item_Class WorldClockDeleteItemsView::world_clock_delete_view_itc_= {
-       .item_style = "worldclock.delete/reorder.list",
-       .func.content_get = WorldClockDeleteItemsView::ContentGet,
-       .func.text_get = WorldClockDeleteItemsView::TextGet,
-       .func.del = WorldClockDeleteItemsView::Del
+       0, 0, EINA_FALSE, EINA_TRUE,
+       "worldclock.delete/reorder.list", nullptr, nullptr,
+       { WorldClockDeleteItemsView::TextGet,
+         WorldClockDeleteItemsView::ContentGet,
+         nullptr,
+         WorldClockDeleteItemsView::Del,
+         nullptr,
+         nullptr,
+       }
 };
 
 void WorldClockDeleteItemsView::AppendItems(std::vector<const model::Location *> locations)
index e4e0651..764d974 100644 (file)
@@ -55,10 +55,15 @@ struct LocationReorderItemData {
 /* Reorder list View */
 
 Elm_Genlist_Item_Class WorldClockReorderView::world_clock_reorder_items_view_itc_ = {
-       .item_style = "worldclock.delete/reorder.list",
-       .func.content_get = WorldClockReorderView::ContentGet,
-       .func.text_get = WorldClockReorderView::TextGet,
-       .func.del = WorldClockReorderView::Del
+       0, 0, EINA_FALSE, EINA_TRUE,
+       "worldclock.delete/reorder.list", nullptr, nullptr,
+       { WorldClockReorderView::TextGet,
+         WorldClockReorderView::ContentGet,
+         nullptr,
+         WorldClockReorderView::Del,
+         nullptr,
+         nullptr,
+       }
 };
 
 
index 786e71e..c5b78c8 100644 (file)
@@ -64,10 +64,15 @@ struct LocationItemData {
 /* Custom list View */
 
 Elm_Genlist_Item_Class WorldClockView::world_clock_itc_= {
-       .item_style = "worldclock.custom.list",
-       .func.content_get = WorldClockView::ContentGet,
-       .func.text_get = WorldClockView::TextGet,
-       .func.del = WorldClockView::Del,
+       0, 0, EINA_FALSE, EINA_TRUE,
+       "worldclock.custom.list", nullptr, nullptr,
+       { WorldClockView::TextGet,
+         WorldClockView::ContentGet,
+         nullptr,
+         WorldClockView::Del,
+         nullptr,
+         nullptr,
+       }
 };
 
 
@@ -512,7 +517,7 @@ Evas_Object *WorldClockView::CreateFloatingButton()
 
 void WorldClockView::UpdateTimezoneLocationsDots(const model::Timezone *timezone)
 {
-       for (int i = 0; i < 8; i++) {
+       for (unsigned int i = 0; i < 8; i++) {
                Edje_Message_Int_Set *msg;
                msg = (Edje_Message_Int_Set *) malloc(
                        sizeof(Edje_Message_Int_Set) + 3 * sizeof(int));
@@ -694,7 +699,7 @@ void WorldClockView::UpdateTimezoneCitiesList(const model::Timezone *timezone)
        char cities[MAX_CITIES_LEN];
        snprintf(cities, sizeof(cities), "%s", cities_list->at(0).name.c_str());
 
-       for (int i = 1; i < cities_list->size(); i++) {
+       for (unsigned int i = 1; i < cities_list->size(); i++) {
                char *tmp = strdup(cities);
                snprintf(cities, sizeof(cities), "%s, %s", tmp, cities_list->at(i).name.c_str());
                free(tmp);