From 6c7d8c6877e8e8f0312a4ef641d4a42f3ba88ddc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 1 Feb 2011 23:20:58 +0000 Subject: [PATCH] Merge two methods. git-svn-id: svn://localhost/ardour2/branches/3.0@8671 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/route.h | 1 - libs/ardour/route.cc | 18 ++++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 3c0e393e5e..e44eb5c061 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -235,7 +235,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, int add_processor (boost::shared_ptr, Placement placement, ProcessorStreams* err = 0); int add_processor (boost::shared_ptr, ProcessorList::iterator iter, ProcessorStreams* err = 0, bool activation_allowed = true); int add_processors (const ProcessorList&, boost::shared_ptr before, ProcessorStreams* err = 0); - int add_processors (const ProcessorList&, ProcessorList::iterator iter, ProcessorStreams* err = 0); int remove_processor (boost::shared_ptr, ProcessorStreams* err = 0); int remove_processors (const ProcessorList&, ProcessorStreams* err = 0); int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index b732fd09e8..bdba28d3f7 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -1014,6 +1014,11 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version) int Route::add_processors (const ProcessorList& others, boost::shared_ptr before, ProcessorStreams* err) { + /* NOTE: this is intended to be used ONLY when copying + processors from another Route. Hence the subtle + differences between this and ::add_processor() + */ + ProcessorList::iterator loc; if (before) { @@ -1023,17 +1028,6 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr loc = find (_processors.begin(), _processors.end(), _main_outs); } - return add_processors (others, loc, err); -} - -int -Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter, ProcessorStreams* err) -{ - /* NOTE: this is intended to be used ONLY when copying - processors from another Route. Hence the subtle - differences between this and ::add_processor() - */ - ChanCount old_pms = processor_max_streams; if (!_session.engine().connected()) { @@ -1071,7 +1065,7 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter } } - ProcessorList::iterator inserted = _processors.insert (iter, *i); + ProcessorList::iterator inserted = _processors.insert (loc, *i); if ((*i)->active()) { (*i)->activate ();