mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
auto-ify a loop in ARDOUR::value_as_string()
so much more readable!
This commit is contained in:
parent
f22b255a3e
commit
1362c2b85d
1 changed files with 3 additions and 5 deletions
|
|
@ -36,11 +36,9 @@ value_as_string(const ARDOUR::ParameterDescriptor& desc,
|
|||
|
||||
if (desc.scale_points) {
|
||||
// Check if value is on a scale point
|
||||
for (ARDOUR::ScalePoints::const_iterator i = desc.scale_points->begin();
|
||||
i != desc.scale_points->end();
|
||||
++i) {
|
||||
if (i->second == v) {
|
||||
return i->first; // Found it, return scale point label
|
||||
for (auto const & [label,val] : *desc.scale_points) {
|
||||
if (val == v) {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue