fix breakage for optimized build caused by semantically critical statement inside...
[ardour.git] / libs / ardour / route.cc
index 749552b0d22bad4a10a9bd2e538b6d38dd6c1929..1a90553be2f80ebd4089597968beb515b595bf6b 100644 (file)
@@ -303,7 +303,7 @@ Route::sync_order_keys (RouteSortOrderKey base)
 }
 
 void
-Route::set_remote_control_id_from_order_key (RouteSortOrderKey key, uint32_t rid)
+Route::set_remote_control_id_from_order_key (RouteSortOrderKey /*key*/, uint32_t rid)
 {
        if (is_master() || is_monitor() || is_hidden()) {
                /* hard-coded remote IDs, or no remote ID */
@@ -1952,7 +1952,7 @@ Route::state(bool full_state)
                        boost::shared_ptr<InternalSend> is;
 
                        if ((is = boost::dynamic_pointer_cast<InternalSend> (*i)) != 0) {
-                               if (is->role() == Delivery::Aux || is->role() == Delivery::Listen) {
+                               if (is->role() == Delivery::Listen) {
                                        continue;
                                }
                        }
@@ -2892,7 +2892,7 @@ Route::direct_feeds_according_to_graph (boost::shared_ptr<Route> other, bool* vi
 
 /** Called from the (non-realtime) butler thread when the transport is stopped */
 void
-Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool did_locate, bool can_flush_processors)
+Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool /*did_locate*/, bool can_flush_processors)
 {
        framepos_t now = _session.transport_frame();
 
@@ -3072,8 +3072,6 @@ Route::flush_processors ()
 void
 Route::set_meter_point (MeterPoint p, bool force)
 {
-       /* CAN BE CALLED FROM PROCESS CONTEXT */
-
        if (_meter_point == p && !force) {
                return;
        }
@@ -4116,6 +4114,12 @@ boost::shared_ptr<Processor>
 Route::the_instrument () const
 {
        Glib::Threads::RWLock::WriterLock lm (_processor_lock);
+       return the_instrument_unlocked ();
+}
+
+boost::shared_ptr<Processor>
+Route::the_instrument_unlocked () const
+{
        for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
                if (boost::dynamic_pointer_cast<PluginInsert>(*i)) {
                        if ((*i)->input_streams().n_midi() > 0 &&
@@ -4127,6 +4131,8 @@ Route::the_instrument () const
        return boost::shared_ptr<Processor>();
 }
 
+
+
 void
 Route::non_realtime_locate (framepos_t pos)
 {