menue.h/cpp: Remove virtual specifier from getOption methods

- Removed the 'const' specifier from CMenuOptionChooser's getOption method.
- Ensured that getOption methods in derived classes do not hide the base class methods.

This should avoid compiler warnings related to method hiding
and ensure that the correct getOption method is used without ambiguity.
Tested and verified that no new warnings or errors are introduced.
This commit is contained in:
2024-07-07 16:54:58 +02:00
parent a14e84d286
commit 2407b36d54
2 changed files with 3 additions and 3 deletions

View File

@@ -2141,7 +2141,7 @@ void CMenuOptionChooser::setOption(const int newvalue)
*optionValue = newvalue;
}
int CMenuOptionChooser::getOption(void) const
int CMenuOptionChooser::getOption(void)
{
return *optionValue;
}

View File

@@ -259,7 +259,7 @@ class CMenuForwarder : public CMenuItem
const std::string * option_string_ptr;
CMenuTarget * jumpTarget;
virtual std::string getOption(void);
std::string getOption(void);
public:
@@ -479,7 +479,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
~CMenuOptionChooser();
void setOption(const int newvalue);
int getOption(void) const;
int getOption(void);
int getWidth(void);
void setOptions(const struct keyval * const Options, const unsigned Number_Of_Options);
void setOptions(const struct keyval_ext * const Options, const unsigned Number_Of_Options);