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;
namespace {
static void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) {
FirmwareValidation* screen = static_cast<FirmwareValidation*>(obj->user_data);
void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<FirmwareValidation*>(obj->user_data);
screen->OnButtonEvent(obj, event);
}
}
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)

View File

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

View File

@ -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<List*>(obj->user_data);
void ButtonEventHandler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<List*>(obj->user_data);
screen->OnButtonEvent(obj, event);
}
}
List::List(uint8_t screenID,

View File

@ -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<Tile*>(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<Tile*>(obj->user_data);
auto* eventDataPtr = (uint32_t*) lv_event_get_data();

View File

@ -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<QuickSettings*>(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<QuickSettings*>(task->user_data);
user_data->UpdateScreen();
}

View File

@ -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<SettingBluetooth*>(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<SettingBluetooth*>(obj->user_data);
screen->OnBluetoothEnabled(obj, event);
}

View File

@ -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<SettingChimes*>(obj->user_data);
void event_handler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<SettingChimes*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
}

View File

@ -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<SettingDisplay*>(obj->user_data);
void event_handler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<SettingDisplay*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
}

View File

@ -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<SettingTimeFormat*>(obj->user_data);
void event_handler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<SettingTimeFormat*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
}

View File

@ -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<SettingWakeUp*>(obj->user_data);
void event_handler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<SettingWakeUp*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
}

View File

@ -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<SettingWatchFace*>(obj->user_data);
void event_handler(lv_obj_t* obj, lv_event_t event) {
auto* screen = static_cast<SettingWatchFace*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
}