summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ingen/client/PluginModel.hpp3
-rw-r--r--src/client/PluginModel.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 2819c8cd..016e444e 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -61,8 +61,7 @@ public:
std::string human_name() const;
std::string port_human_name(uint32_t index) const;
- typedef std::pair<float, std::string> ScalePoint;
- typedef std::list<ScalePoint> ScalePoints;
+ typedef std::map<float, std::string> ScalePoints;
ScalePoints port_scale_points(uint32_t i) const;
static LilvWorld* lilv_world() { return _lilv_world; }
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 179e935b..5f83d82d 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -209,10 +209,9 @@ PluginModel::port_scale_points(uint32_t i) const
LilvScalePoints* sp = lilv_port_get_scale_points(_lilv_plugin, port);
LILV_FOREACH(scale_points, i, sp) {
const LilvScalePoint* p = lilv_scale_points_get(sp, i);
- points.push_back(
- std::make_pair(
- lilv_node_as_float(lilv_scale_point_get_value(p)),
- lilv_node_as_string(lilv_scale_point_get_label(p))));
+ points.insert(
+ make_pair(lilv_node_as_float(lilv_scale_point_get_value(p)),
+ lilv_node_as_string(lilv_scale_point_get_label(p))));
}
}
return points;