make Route::nth_send() and Route::nth_processor() be const
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 27 Jan 2016 16:37:54 +0000 (11:37 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 27 Jan 2016 16:37:54 +0000 (11:37 -0500)
libs/ardour/ardour/route.h
libs/ardour/route.cc

index 829bf13298e01d9e06a45c60ea921eccf3a647ed..864ae911e50683bffaf60c85e27f93bec23f27ff 100644 (file)
@@ -224,8 +224,8 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
 
        boost::shared_ptr<Processor> processor_by_id (PBD::ID) const;
 
-       boost::shared_ptr<Processor> nth_plugin (uint32_t n);
-       boost::shared_ptr<Processor> nth_send (uint32_t n);
+       boost::shared_ptr<Processor> nth_plugin (uint32_t n) const;
+       boost::shared_ptr<Processor> nth_send (uint32_t n) const;
 
        bool has_io_processor_named (const std::string&);
        ChanCount max_processor_streams () const { return processor_max_streams; }
index 8549bb34a64096512720b07a7266a9e1472dc5f0..ff765ad89d865e0e36489f4dfe96632491429318 100644 (file)
@@ -4491,10 +4491,10 @@ Route::get_control (const Evoral::Parameter& param)
 }
 
 boost::shared_ptr<Processor>
-Route::nth_plugin (uint32_t n)
+Route::nth_plugin (uint32_t n) const
 {
        Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-       ProcessorList::iterator i;
+       ProcessorList::const_iterator i;
 
        for (i = _processors.begin(); i != _processors.end(); ++i) {
                if (boost::dynamic_pointer_cast<PluginInsert> (*i)) {
@@ -4508,10 +4508,10 @@ Route::nth_plugin (uint32_t n)
 }
 
 boost::shared_ptr<Processor>
-Route::nth_send (uint32_t n)
+Route::nth_send (uint32_t n) const
 {
        Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-       ProcessorList::iterator i;
+       ProcessorList::const_iterator i;
 
        for (i = _processors.begin(); i != _processors.end(); ++i) {
                if (boost::dynamic_pointer_cast<Send> (*i)) {