From 3bd37bf4e032f877be162ea8de8a5b0839769aca Mon Sep 17 00:00:00 2001 From: Kelly Byrd Date: Sat, 4 Feb 2017 12:28:04 -0800 Subject: [PATCH] Removed const modifer to Widget::update in the 480x272 GUI. (#4397) I was getting const errors with a recent gcc. So I removed the const modifer to Widget::update in the 480x272 GUI. This caused menu_settings.cpp menuSettings() to complain, because it was being passed a param called 'object' of type pointer to a const T, and then called object->update(), which is not a const function. However, the one call site I found to menuSettings() (menu_settings.cpp:224) is passing currentWidget, which is of type Widget*. --- radio/src/gui/480x272/screens_setup.cpp | 2 +- radio/src/gui/480x272/widget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/480x272/screens_setup.cpp b/radio/src/gui/480x272/screens_setup.cpp index 9908f585b..8a4523a56 100644 --- a/radio/src/gui/480x272/screens_setup.cpp +++ b/radio/src/gui/480x272/screens_setup.cpp @@ -174,7 +174,7 @@ int getOptionsCount(const ZoneOption * options) } template -bool menuSettings(const char * title, const T * object, uint32_t i_flags, event_t event) +bool menuSettings(const char * title, T * object, uint32_t i_flags, event_t event) { if (object->getErrorMessage()) { diff --git a/radio/src/gui/480x272/widget.h b/radio/src/gui/480x272/widget.h index fc41f2044..d13b79d7d 100644 --- a/radio/src/gui/480x272/widget.h +++ b/radio/src/gui/480x272/widget.h @@ -45,7 +45,7 @@ class Widget { } - virtual void update() const + virtual void update() { }