Cosmetics

This commit is contained in:
Bertrand Songis
2020-12-17 11:38:12 +01:00
parent 445fd941cc
commit 57efa0d6bb
+3 -4
View File
@@ -87,7 +87,7 @@ class Choice : public ChoiceBase {
isValueAvailable = std::move(handler); isValueAvailable = std::move(handler);
} }
unsigned getIndexFromValue(int value) unsigned getIndexFromValue(int value) const
{ {
if (!isValueAvailable) { if (!isValueAvailable) {
return value - vmin; return value - vmin;
@@ -102,7 +102,7 @@ class Choice : public ChoiceBase {
return index; return index;
} }
int getValueFromIndex(int index) int getValueFromIndex(int index) const
{ {
if (!isValueAvailable) { if (!isValueAvailable) {
return vmin + index; return vmin + index;
@@ -119,7 +119,7 @@ class Choice : public ChoiceBase {
return value; return value;
} }
unsigned getValuesCount() unsigned getValuesCount() const
{ {
return getIndexFromValue(vmax + 1); return getIndexFromValue(vmax + 1);
} }
@@ -158,4 +158,3 @@ class Choice : public ChoiceBase {
virtual void openMenu(); virtual void openMenu();
}; };