Use human-numeric-sort for plugin scale-points

This commit is contained in:
Robin Gareus 2019-12-29 19:48:45 +01:00
parent 04a409df6f
commit bb232b6ec4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -20,6 +20,7 @@
#ifndef __ardour_parameter_descriptor_h__
#define __ardour_parameter_descriptor_h__
#include "pbd/natsort.h"
#include "ardour/types.h"
#include "ardour/variant.h"
@ -28,7 +29,13 @@
namespace ARDOUR {
typedef std::map<const std::string, const float> ScalePoints;
struct CompareNumericallyLess {
bool operator() (std::string const& a, std::string const& b) const {
return PBD::numerically_less (a.c_str(), b.c_str());
}
};
typedef std::map<const std::string, const float, CompareNumericallyLess> ScalePoints;
/** Descriptor of a parameter or control.
*