diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-09-22 23:27:09 (GMT) |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2021-12-09 20:32:07 (GMT) |
| commit | 736ae08fcdd3f87a6412985eec131179d8cc6664 (patch) | |
| tree | 864d7cc7d387d18c13f50534a11572f4d6494c15 /src/displayapp/screens/settings/SettingTimeFormat.h | |
| parent | 494448b7ccada7e314310bb471c33c550e0e8bdf (diff) | |
Optimize arrays
Diffstat (limited to 'src/displayapp/screens/settings/SettingTimeFormat.h')
| -rw-r--r-- | src/displayapp/screens/settings/SettingTimeFormat.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/displayapp/screens/settings/SettingTimeFormat.h b/src/displayapp/screens/settings/SettingTimeFormat.h index 0113e35..fa24eab 100644 --- a/src/displayapp/screens/settings/SettingTimeFormat.h +++ b/src/displayapp/screens/settings/SettingTimeFormat.h @@ -19,10 +19,9 @@ namespace Pinetime { void UpdateSelected(lv_obj_t* object, lv_event_t event); private: - const std::array<std::string, 2> options = {" 12-hour", " 24-hour"}; - + static constexpr std::array<const char*, 2> options = {" 12-hour", " 24-hour"}; Controllers::Settings& settingsController; - lv_obj_t* cbOption[2]; + lv_obj_t* cbOption[options.size()]; }; } } |
