From 54df828665b135aa5e49a2e182bad59d2d705039 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sat, 9 Apr 2022 13:37:31 +0300 Subject: [PATCH] Fix warnings --- src/displayapp/screens/FirmwareValidation.cpp | 5 ++--- src/displayapp/screens/HeartRate.cpp | 4 ++-- src/displayapp/screens/List.cpp | 5 ++--- src/displayapp/screens/Tile.cpp | 8 +++++--- src/displayapp/screens/settings/QuickSettings.cpp | 4 ++-- src/displayapp/screens/settings/SettingBluetooth.cpp | 4 ++-- src/displayapp/screens/settings/SettingChimes.cpp | 4 ++-- src/displayapp/screens/settings/SettingDisplay.cpp | 4 ++-- src/displayapp/screens/settings/SettingTimeFormat.cpp | 4 ++-- src/displayapp/screens/settings/SettingWakeUp.cpp | 4 ++-- src/displayapp/screens/settings/SettingWatchFace.cpp | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp index 2403b58c..52ff954e 100644 --- a/src/displayapp/screens/FirmwareValidation.cpp +++ b/src/displayapp/screens/FirmwareValidation.cpp @@ -7,11 +7,10 @@ using namespace Pinetime::Applications::Screens; namespace { - static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { - FirmwareValidation* screen = static_cast(obj->user_data); + void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->OnButtonEvent(obj, event); } - } FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator) diff --git a/src/displayapp/screens/HeartRate.cpp b/src/displayapp/screens/HeartRate.cpp index 77d91213..ac061b4e 100644 --- a/src/displayapp/screens/HeartRate.cpp +++ b/src/displayapp/screens/HeartRate.cpp @@ -21,8 +21,8 @@ namespace { return ""; } - static void btnStartStopEventHandler(lv_obj_t* obj, lv_event_t event) { - HeartRate* screen = static_cast(obj->user_data); + void btnStartStopEventHandler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->OnStartStopEvent(event); } } diff --git a/src/displayapp/screens/List.cpp b/src/displayapp/screens/List.cpp index 7d8a1415..ffc62150 100644 --- a/src/displayapp/screens/List.cpp +++ b/src/displayapp/screens/List.cpp @@ -5,11 +5,10 @@ using namespace Pinetime::Applications::Screens; namespace { - static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { - List* screen = static_cast(obj->user_data); + void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->OnButtonEvent(obj, event); } - } List::List(uint8_t screenID, diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp index 4838bb31..cfbe44d3 100644 --- a/src/displayapp/screens/Tile.cpp +++ b/src/displayapp/screens/Tile.cpp @@ -5,13 +5,15 @@ using namespace Pinetime::Applications::Screens; namespace { - static void lv_update_task(struct _lv_task_t* task) { + void lv_update_task(struct _lv_task_t* task) { auto* user_data = static_cast(task->user_data); user_data->UpdateScreen(); } - static void event_handler(lv_obj_t* obj, lv_event_t event) { - if (event != LV_EVENT_VALUE_CHANGED) return; + void event_handler(lv_obj_t* obj, lv_event_t event) { + if (event != LV_EVENT_VALUE_CHANGED) { + return; + } Tile* screen = static_cast(obj->user_data); auto* eventDataPtr = (uint32_t*) lv_event_get_data(); diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp index 44d1aa26..aa7f17a3 100644 --- a/src/displayapp/screens/settings/QuickSettings.cpp +++ b/src/displayapp/screens/settings/QuickSettings.cpp @@ -6,12 +6,12 @@ using namespace Pinetime::Applications::Screens; namespace { - static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { + void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { auto* screen = static_cast(obj->user_data); screen->OnButtonEvent(obj, event); } - static void lv_update_task(struct _lv_task_t* task) { + void lv_update_task(struct _lv_task_t* task) { auto* user_data = static_cast(task->user_data); user_data->UpdateScreen(); } diff --git a/src/displayapp/screens/settings/SettingBluetooth.cpp b/src/displayapp/screens/settings/SettingBluetooth.cpp index ab1af223..2fc5d95c 100644 --- a/src/displayapp/screens/settings/SettingBluetooth.cpp +++ b/src/displayapp/screens/settings/SettingBluetooth.cpp @@ -9,12 +9,12 @@ using namespace Pinetime::Applications::Screens; namespace { - static void OnBluetoothDisabledEvent(lv_obj_t* obj, lv_event_t event) { + void OnBluetoothDisabledEvent(lv_obj_t* obj, lv_event_t event) { auto* screen = static_cast(obj->user_data); screen->OnBluetoothDisabled(obj, event); } - static void OnBluetoothEnabledEvent(lv_obj_t* obj, lv_event_t event) { + void OnBluetoothEnabledEvent(lv_obj_t* obj, lv_event_t event) { auto* screen = static_cast(obj->user_data); screen->OnBluetoothEnabled(obj, event); } diff --git a/src/displayapp/screens/settings/SettingChimes.cpp b/src/displayapp/screens/settings/SettingChimes.cpp index 543b5e0e..d53d4da6 100644 --- a/src/displayapp/screens/settings/SettingChimes.cpp +++ b/src/displayapp/screens/settings/SettingChimes.cpp @@ -8,8 +8,8 @@ using namespace Pinetime::Applications::Screens; namespace { - static void event_handler(lv_obj_t* obj, lv_event_t event) { - SettingChimes* screen = static_cast(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->UpdateSelected(obj, event); } } diff --git a/src/displayapp/screens/settings/SettingDisplay.cpp b/src/displayapp/screens/settings/SettingDisplay.cpp index 9e972afc..229143f7 100644 --- a/src/displayapp/screens/settings/SettingDisplay.cpp +++ b/src/displayapp/screens/settings/SettingDisplay.cpp @@ -9,8 +9,8 @@ using namespace Pinetime::Applications::Screens; namespace { - static void event_handler(lv_obj_t* obj, lv_event_t event) { - SettingDisplay* screen = static_cast(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->UpdateSelected(obj, event); } } diff --git a/src/displayapp/screens/settings/SettingTimeFormat.cpp b/src/displayapp/screens/settings/SettingTimeFormat.cpp index bd9af156..5502794b 100644 --- a/src/displayapp/screens/settings/SettingTimeFormat.cpp +++ b/src/displayapp/screens/settings/SettingTimeFormat.cpp @@ -8,8 +8,8 @@ using namespace Pinetime::Applications::Screens; namespace { - static void event_handler(lv_obj_t* obj, lv_event_t event) { - SettingTimeFormat* screen = static_cast(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->UpdateSelected(obj, event); } } diff --git a/src/displayapp/screens/settings/SettingWakeUp.cpp b/src/displayapp/screens/settings/SettingWakeUp.cpp index e1b6e36e..4a4b60f8 100644 --- a/src/displayapp/screens/settings/SettingWakeUp.cpp +++ b/src/displayapp/screens/settings/SettingWakeUp.cpp @@ -8,8 +8,8 @@ using namespace Pinetime::Applications::Screens; namespace { - static void event_handler(lv_obj_t* obj, lv_event_t event) { - SettingWakeUp* screen = static_cast(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->UpdateSelected(obj, event); } } diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp index 50085925..3cb2a364 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.cpp +++ b/src/displayapp/screens/settings/SettingWatchFace.cpp @@ -8,8 +8,8 @@ using namespace Pinetime::Applications::Screens; namespace { - static void event_handler(lv_obj_t* obj, lv_event_t event) { - SettingWatchFace* screen = static_cast(obj->user_data); + void event_handler(lv_obj_t* obj, lv_event_t event) { + auto* screen = static_cast(obj->user_data); screen->UpdateSelected(obj, event); } }