summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mini_timeline.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-17 13:00:33 +0100
committerRobin Gareus <robin@gareus.org>2016-12-17 13:00:33 +0100
commit8405f642e769861ae9f070137c35d7dcd0983de2 (patch)
tree5d007ce0c9395835aac0b9c4980f9a1fa5b7f3dd /gtk2_ardour/mini_timeline.cc
parent705a7262a385764839af13be60f75b069badde73 (diff)
fix gcc4 compilation (local type used in template)
Diffstat (limited to 'gtk2_ardour/mini_timeline.cc')
-rw-r--r--gtk2_ardour/mini_timeline.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/gtk2_ardour/mini_timeline.cc b/gtk2_ardour/mini_timeline.cc
index f9b1904873..a3e3b8d324 100644
--- a/gtk2_ardour/mini_timeline.cc
+++ b/gtk2_ardour/mini_timeline.cc
@@ -288,6 +288,19 @@ MiniTimeline::draw_mark (cairo_t* cr, int x0, int x1, int h, const std::string&
return rw;
}
+struct LocationMarker {
+ LocationMarker (const std::string& l, framepos_t w)
+ : label (l), when (w) {}
+ std::string label;
+ framepos_t when;
+};
+
+struct LocationMarkerSort {
+ bool operator() (const LocationMarker& a, const LocationMarker& b) {
+ return (a.when < b.when);
+ }
+};
+
void
MiniTimeline::render (cairo_t* cr, cairo_rectangle_t*)
{
@@ -357,19 +370,6 @@ MiniTimeline::render (cairo_t* cr, cairo_rectangle_t*)
lmin -= mw / px_per_sample;
lmax += mw / px_per_sample;
- struct LocationMarker {
- LocationMarker (const std::string& l, framepos_t w)
- : label (l), when (w) {}
- std::string label;
- framepos_t when;
- };
-
- struct LocationMarkerSort {
- bool operator() (const LocationMarker& a, const LocationMarker& b) {
- return (a.when < b.when);
- }
- } location_marker_sort;
-
std::vector<LocationMarker> lm;
const Locations::LocationList& ll (_session->locations ()->list ());
@@ -398,6 +398,8 @@ MiniTimeline::render (cairo_t* cr, cairo_rectangle_t*)
}
_jumplist.clear ();
+
+ LocationMarkerSort location_marker_sort;
std::sort (lm.begin(), lm.end(), location_marker_sort);
for (std::vector<LocationMarker>::const_iterator l = lm.begin(); l != lm.end();) {