Cosmetics
This commit is contained in:
+3
-4
@@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user