From ecb3cd3e315ebd88fb4eb031562f60491d1765eb Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Sun, 1 May 2022 20:21:37 +0200 Subject: [PATCH] SettingChimes: private Option struct, use std::array for cbOption --- src/displayapp/screens/settings/SettingChimes.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/displayapp/screens/settings/SettingChimes.h b/src/displayapp/screens/settings/SettingChimes.h index 70b080a8..e48432c6 100644 --- a/src/displayapp/screens/settings/SettingChimes.h +++ b/src/displayapp/screens/settings/SettingChimes.h @@ -13,24 +13,23 @@ namespace Pinetime { class SettingChimes : public Screen { public: - struct Option { - Controllers::Settings::ChimesOption chimesOption; - const char* name; - }; - SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController); ~SettingChimes() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); private: + struct Option { + Controllers::Settings::ChimesOption chimesOption; + const char* name; + }; static constexpr std::array options = {{ {Controllers::Settings::ChimesOption::None, " Off"}, {Controllers::Settings::ChimesOption::Hours, " Every hour"}, {Controllers::Settings::ChimesOption::HalfHours, " Every 30 mins"} }}; - lv_obj_t* cbOption[options.size()]; + std::array cbOption; Controllers::Settings& settingsController; };