mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Minor cleanup to SchemaOverlay
This commit is contained in:
parent
468559dcae
commit
e70f87387e
@ -76,7 +76,7 @@ static std::string stringValueForDouble(const double value, const int precision
|
|||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::function<std::string(int)> INT_FORMATTER =
|
static std::function<std::string(int)> intFormatter =
|
||||||
[](int value) -> std::string {
|
[](int value) -> std::string {
|
||||||
return std::to_string(value);
|
return std::to_string(value);
|
||||||
};
|
};
|
||||||
@ -294,10 +294,10 @@ void SchemaOverlay::ShowIntOverlay(
|
|||||||
std::string name(entry->entry.name);
|
std::string name(entry->entry.name);
|
||||||
|
|
||||||
auto title = numberInputTitle(
|
auto title = numberInputTitle(
|
||||||
name, entry->minValue, entry->maxValue, INT_FORMATTER);
|
name, entry->minValue, entry->maxValue, intFormatter);
|
||||||
|
|
||||||
auto validator = std::make_shared<NumberValidator<int>>(
|
auto validator = std::make_shared<NumberValidator<int>>(
|
||||||
entry->minValue, entry->maxValue, INT_FORMATTER);
|
entry->minValue, entry->maxValue, intFormatter);
|
||||||
|
|
||||||
auto handler = [prefs, name, callback](std::string value) {
|
auto handler = [prefs, name, callback](std::string value) {
|
||||||
prefs->SetInt(name, (int) std::stod(value));
|
prefs->SetInt(name, (int) std::stod(value));
|
||||||
|
Loading…
Reference in New Issue
Block a user