From 8405f642e769861ae9f070137c35d7dcd0983de2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 17 Dec 2016 13:00:33 +0100 Subject: fix gcc4 compilation (local type used in template) --- gtk2_ardour/mini_timeline.cc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'gtk2_ardour/mini_timeline.cc') 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 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::const_iterator l = lm.begin(); l != lm.end();) { -- cgit v1.2.3