From 9687c756a6010d24f88f8faaa77466bae8922b9a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 27 Apr 2015 04:57:28 +0200 Subject: [PATCH] const iterators --- libs/ardour/route.cc | 4 ++-- libs/pbd/pbd/signals.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 5df1be71cb..3c03d7c1a4 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -570,7 +570,7 @@ Route::process_output_buffers (BufferSet& bufs, framecnt_t latency = 0; - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { + for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { if (meter_already_run && boost::dynamic_pointer_cast (*i)) { /* don't ::run() the meter, otherwise it will have its previous peak corrupted */ @@ -4137,7 +4137,7 @@ Route::set_processor_positions () Glib::Threads::RWLock::ReaderLock lm (_processor_lock); bool had_amp = false; - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { + for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { (*i)->set_pre_fader (!had_amp); if (boost::dynamic_pointer_cast (*i)) { had_amp = true; diff --git a/libs/pbd/pbd/signals.py b/libs/pbd/pbd/signals.py index caf3128bfa..9495b70f89 100644 --- a/libs/pbd/pbd/signals.py +++ b/libs/pbd/pbd/signals.py @@ -112,7 +112,7 @@ def signal(f, n, v): print("\t\tGlib::Threads::Mutex::Lock lm (_mutex);", file=f) print("\t\t/* Tell our connection objects that we are going away, so they don't try to call us */", file=f) - print("\t\tfor (%sSlots::iterator i = _slots.begin(); i != _slots.end(); ++i) {" % typename, file=f) + print("\t\tfor (%sSlots::const_iterator i = _slots.begin(); i != _slots.end(); ++i) {" % typename, file=f) print("\t\t\ti->first->signal_going_away ();", file=f) print("\t\t}", file=f) @@ -240,7 +240,7 @@ def signal(f, n, v): print("", file=f) if not v: print("\t\tstd::list r;", file=f) - print("\t\tfor (%sSlots::iterator i = s.begin(); i != s.end(); ++i) {" % typename, file=f) + print("\t\tfor (%sSlots::const_iterator i = s.begin(); i != s.end(); ++i) {" % typename, file=f) print(""" /* We may have just called a slot, and this may have resulted in disconnection of other slots from us. The list copy means that