1
0
Fork 0

Fix warnings

This commit is contained in:
Riku Isokoski 2022-04-09 13:37:31 +03:00
parent b7b1af1c4c
commit 54df828665
11 changed files with 25 additions and 25 deletions

View file

@ -7,11 +7,10 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) {
FirmwareValidation* screen = static_cast<FirmwareValidation*>(obj->user_data); auto* screen = static_cast<FirmwareValidation*>(obj->user_data);
screen->OnButtonEvent(obj, event); screen->OnButtonEvent(obj, event);
} }
} }
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator) FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)

View file

@ -21,8 +21,8 @@ namespace {
return ""; return "";
} }
static void btnStartStopEventHandler(lv_obj_t* obj, lv_event_t event) { void btnStartStopEventHandler(lv_obj_t* obj, lv_event_t event) {
HeartRate* screen = static_cast<HeartRate*>(obj->user_data); auto* screen = static_cast<HeartRate*>(obj->user_data);
screen->OnStartStopEvent(event); screen->OnStartStopEvent(event);
} }
} }

View file

@ -5,11 +5,10 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) { void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) {
List* screen = static_cast<List*>(obj->user_data); auto* screen = static_cast<List*>(obj->user_data);
screen->OnButtonEvent(obj, event); screen->OnButtonEvent(obj, event);
} }
} }
List::List(uint8_t screenID, List::List(uint8_t screenID,

View file

@ -5,13 +5,15 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { 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<Tile*>(task->user_data); auto* user_data = static_cast<Tile*>(task->user_data);
user_data->UpdateScreen(); user_data->UpdateScreen();
} }
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
if (event != LV_EVENT_VALUE_CHANGED) return; if (event != LV_EVENT_VALUE_CHANGED) {
return;
}
Tile* screen = static_cast<Tile*>(obj->user_data); Tile* screen = static_cast<Tile*>(obj->user_data);
auto* eventDataPtr = (uint32_t*) lv_event_get_data(); auto* eventDataPtr = (uint32_t*) lv_event_get_data();

View file

@ -6,12 +6,12 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { 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<QuickSettings*>(obj->user_data); auto* screen = static_cast<QuickSettings*>(obj->user_data);
screen->OnButtonEvent(obj, event); 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<QuickSettings*>(task->user_data); auto* user_data = static_cast<QuickSettings*>(task->user_data);
user_data->UpdateScreen(); user_data->UpdateScreen();
} }

View file

@ -9,12 +9,12 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { 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<SettingBluetooth*>(obj->user_data); auto* screen = static_cast<SettingBluetooth*>(obj->user_data);
screen->OnBluetoothDisabled(obj, event); 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<SettingBluetooth*>(obj->user_data); auto* screen = static_cast<SettingBluetooth*>(obj->user_data);
screen->OnBluetoothEnabled(obj, event); screen->OnBluetoothEnabled(obj, event);
} }

View file

@ -8,8 +8,8 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
SettingChimes* screen = static_cast<SettingChimes*>(obj->user_data); auto* screen = static_cast<SettingChimes*>(obj->user_data);
screen->UpdateSelected(obj, event); screen->UpdateSelected(obj, event);
} }
} }

View file

@ -9,8 +9,8 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
SettingDisplay* screen = static_cast<SettingDisplay*>(obj->user_data); auto* screen = static_cast<SettingDisplay*>(obj->user_data);
screen->UpdateSelected(obj, event); screen->UpdateSelected(obj, event);
} }
} }

View file

@ -8,8 +8,8 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
SettingTimeFormat* screen = static_cast<SettingTimeFormat*>(obj->user_data); auto* screen = static_cast<SettingTimeFormat*>(obj->user_data);
screen->UpdateSelected(obj, event); screen->UpdateSelected(obj, event);
} }
} }

View file

@ -8,8 +8,8 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
SettingWakeUp* screen = static_cast<SettingWakeUp*>(obj->user_data); auto* screen = static_cast<SettingWakeUp*>(obj->user_data);
screen->UpdateSelected(obj, event); screen->UpdateSelected(obj, event);
} }
} }

View file

@ -8,8 +8,8 @@
using namespace Pinetime::Applications::Screens; using namespace Pinetime::Applications::Screens;
namespace { namespace {
static void event_handler(lv_obj_t* obj, lv_event_t event) { void event_handler(lv_obj_t* obj, lv_event_t event) {
SettingWatchFace* screen = static_cast<SettingWatchFace*>(obj->user_data); auto* screen = static_cast<SettingWatchFace*>(obj->user_data);
screen->UpdateSelected(obj, event); screen->UpdateSelected(obj, event);
} }
} }