diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-10 13:50:19 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-10 13:57:18 -0400 |
commit | 2d4358ddb5e9cf3cd21b603b74dc999aaebf53a2 (patch) | |
tree | 156fb8fa0d0e182cacece8d112cb4dec3fd3f5aa /gtk2_ardour/group_tabs.cc | |
parent | 3eaa6c038988776e3bab441b84de45b2a8364130 (diff) |
Various changes to PresentationInfo and a small consolidation of sorters.
The semantics for sorting PresentationInfo are up to the caller, not the
PresentationInfo object, so operator<() was removed and callers specifically
invoke ::order() for sorting.
Diffstat (limited to 'gtk2_ardour/group_tabs.cc')
-rw-r--r-- | gtk2_ardour/group_tabs.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index 06e50f274b..f7ceb9e996 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -663,18 +663,6 @@ GroupTabs::un_subgroup (RouteGroup* g) g->destroy_subgroup (); } -struct CollectSorter { - bool operator () (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) { - return a->presentation_info () < b->presentation_info(); - } -}; - -struct OrderSorter { - bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) { - return a->presentation_info() < b->presentation_info(); - } -}; - /** Collect all members of a RouteGroup so that they are together in the Editor or Mixer. * @param g Group to collect. */ @@ -682,12 +670,12 @@ void GroupTabs::collect (RouteGroup* g) { boost::shared_ptr<RouteList> group_routes = g->route_list (); - group_routes->sort (CollectSorter ()); + group_routes->sort (Stripable::PresentationOrderSorter()); int const N = group_routes->size (); RouteList::iterator i = group_routes->begin (); boost::shared_ptr<RouteList> routes = _session->get_routes (); - routes->sort (OrderSorter ()); + routes->sort (Stripable::PresentationOrderSorter()); RouteList::const_iterator j = routes->begin (); int diff = 0; |