drastic, deep and wide changes to make RouteGroup use boost::shared_ptr<Route> and...
[ardour.git] / libs / ardour / ardour / route_group_specialized.h
index c9d06a93c9aeaa243235d8560be52656cac0be26..242a16c43e471ecc0d72548886d99d552ac72256 100644 (file)
 namespace ARDOUR {
 
 template<class T> void
-RouteGroup::apply (void (Track::*func)(T, void *), T val, void */*src*/)
+RouteGroup::apply (void (Track::*func)(T, void *), T val, void/*src*/)
 {
-       for (std::list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) {
-               Track *at;
-               if ((at = dynamic_cast<Track*>(*i)) != 0) {
-                       (at->*func)(val, this);
+       for (RouteList::iterator i = routes->begin(); i != routes->end(); i++) {
+               boost::shared_ptr<Track> at;
+
+               if ((at = boost::dynamic_pointer_cast<Track>(*i)) != 0) {
+                       (at.get()->*func)(val, this);
                }
        }
 }
@@ -39,3 +40,4 @@ RouteGroup::apply (void (Track::*func)(T, void *), T val, void */*src*/)
 } /* namespace ARDOUR */
 
 #endif /* __ardour_route_group_specialized_h__ */
+