diff options
author | hassless <85612141+hassless@users.noreply.github.com> | 2021-06-18 17:17:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 17:17:26 +0200 |
commit | 84a6c88e98d8b1420edbddd7b67a38737bf5cbb2 (patch) | |
tree | b10cab7ef1a7645fa897aabb179c2e8849a919d7 /src/displayapp/screens/SystemInfo.cpp | |
parent | d0df278b0be2aae0493d901569a094dba221ce99 (diff) | |
parent | e90e8c7426f9a44e696b208a5b393a60476a3d43 (diff) |
Merge branch 'JF002:develop' into improve-battery-percentage-to-battery-icon-mapping
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
-rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index f61d2ff1..9ff28288 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -81,7 +81,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen1() { __TIME__); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr<Screen>(new Screens::Label(0, 5, app, label)); + return std::make_unique<Screens::Label>(0, 5, app, label); } std::unique_ptr<Screen> SystemInfo::CreateScreen2() { @@ -161,7 +161,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen2() { brightnessController.ToString(), resetReason); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr<Screen>(new Screens::Label(1, 4, app, label)); + return std::make_unique<Screens::Label>(1, 5, app, label); } std::unique_ptr<Screen> SystemInfo::CreateScreen3() { @@ -195,10 +195,10 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() { (int) mon.free_biggest_size, 0); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr<Screen>(new Screens::Label(2, 5, app, label)); + return std::make_unique<Screens::Label>(2, 5, app, label); } -bool sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { +bool SystemInfo::sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { return lhs.xTaskNumber < rhs.xTaskNumber; } @@ -229,7 +229,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen4() { lv_table_set_cell_value(infoTask, i + 1, 2, std::to_string(tasksStatus[i].usStackHighWaterMark).c_str()); } } - return std::unique_ptr<Screen>(new Screens::Label(3, 5, app, infoTask)); + return std::make_unique<Screens::Label>(3, 5, app, infoTask); } std::unique_ptr<Screen> SystemInfo::CreateScreen5() { @@ -245,5 +245,5 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen5() { "#FFFF00 JF002/InfiniTime#"); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::unique_ptr<Screen>(new Screens::Label(4, 5, app, label)); + return std::make_unique<Screens::Label>(4, 5, app, label); } |