diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2021-06-16 16:33:34 +0200 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2021-06-16 16:33:34 +0200 |
commit | f5d756928ffef032fb5ac85e73f9a68b7b8f64dc (patch) | |
tree | 907608958d0be8a97a3d646c842fde3095cef939 /src/displayapp/screens/SystemInfo.cpp | |
parent | f2d01166c380b72ebcb13ef649def88ff4cf2d21 (diff) | |
parent | e90e8c7426f9a44e696b208a5b393a60476a3d43 (diff) |
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
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); } |