Skip to content

Commit 4f426f0

Browse files
lmamaneLionel Elie Mamane
andauthored
set static text as static text (#2312)
and save a few bytes of heap memory Co-authored-by: Lionel Elie Mamane <lionel@mamane.lu>
1 parent 85a0542 commit 4f426f0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/displayapp/screens/settings/SettingWakeUp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
using namespace Pinetime::Applications::Screens;
1010

11-
constexpr std::array<SettingWakeUp::Option, 5> SettingWakeUp::options;
12-
1311
namespace {
1412
void event_handler(lv_obj_t* obj, lv_event_t event) {
1513
auto* screen = static_cast<SettingWakeUp*>(obj->user_data);
@@ -45,7 +43,7 @@ SettingWakeUp::SettingWakeUp(Pinetime::Controllers::Settings& settingsController
4543

4644
for (unsigned int i = 0; i < options.size(); i++) {
4745
cbOption[i] = lv_checkbox_create(container1, nullptr);
48-
lv_checkbox_set_text(cbOption[i], options[i].name);
46+
lv_checkbox_set_text_static(cbOption[i], options[i].name);
4947
if (settingsController.isWakeUpModeOn(static_cast<Controllers::Settings::WakeUpMode>(i))) {
5048
lv_checkbox_set_checked(cbOption[i], true);
5149
}

0 commit comments

Comments
 (0)