From ce234f363e95c38fc92728e520bf5ba240a89aa7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 25 Aug 2006 01:07:15 +0000 Subject: use shared_ptr<> for all region handling git-svn-id: svn://localhost/ardour2/trunk@852 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/selection_templates.h | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'gtk2_ardour/selection_templates.h') diff --git a/gtk2_ardour/selection_templates.h b/gtk2_ardour/selection_templates.h index 9511db7d61..5440112ad6 100644 --- a/gtk2_ardour/selection_templates.h +++ b/gtk2_ardour/selection_templates.h @@ -34,33 +34,17 @@ inline void Selection::foreach_region (void (ARDOUR::Region::*method)(void)) { for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) { - ((*i)->region().*(method))(); + ARDOUR::Region* region = (*i)->region().get(); + (region->*(method))(); } } template inline void Selection::foreach_region (void (ARDOUR::Region::*method)(A), A arg) { for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) { - ((*i)->region().*(method))(arg); + ARDOUR::Region* region = (*i)->region().get(); + (region->*(method))(arg); } } -#if 0 - -template inline void -Selection::foreach_route (void (ARDOUR::Route::*method)(A), A arg) { - for (list::iterator i = routes.begin(); i != routes.end(); ++i) { - ((*i)->region().*(method))(arg); - } -} - -template inline void -Selection::foreach_route (void (ARDOUR::Route::*method)(A1,A2), A1 arg1, A2 arg2) { - for (list::iterator i = routes.begin(); i != routes.end(); ++i) { - ((*i)->region().*(method))(arg1, arg2); - } -} - -#endif - #endif /* __ardour_gtk_selection_templates_h__ */ -- cgit v1.2.3