summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-08-04 15:06:10 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-08-04 15:06:10 +0100
commitfa59391f6a8b8bffbf07fc567d726c40424fe7f7 (patch)
tree58f75809b308ffc0bedc8879666374806b2d3830
parentaaabaf5d3c8624f398809bb468e2b121a23abda0 (diff)
'libs/ardour' - Use 'const_iterator' where appropriate (required to be buildable with MSVC)
-rw-r--r--libs/ardour/diskstream.cc2
-rw-r--r--libs/ardour/playlist.cc8
-rw-r--r--libs/ardour/route.cc2
-rw-r--r--libs/ardour/session_playlists.cc8
-rw-r--r--libs/pbd/pbd/sequence_property.h6
5 files changed, 13 insertions, 13 deletions
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 6ef4327343..d931cfd432 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -570,7 +570,7 @@ Diskstream::move_processor_automation (boost::weak_ptr<Processor> p, list< Evora
set<Evoral::Parameter> const a = processor->what_can_be_automated ();
- for (set<Evoral::Parameter>::iterator i = a.begin (); i != a.end (); ++i) {
+ for (set<Evoral::Parameter>::const_iterator i = a.begin (); i != a.end (); ++i) {
boost::shared_ptr<AutomationList> al = processor->automation_control(*i)->alist();
XMLNode & before = al->get_state ();
bool const things_moved = al->move_ranges (movements);
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index bb79801c9f..47462a3575 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -1997,11 +1997,11 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
freeze ();
/* add the added regions */
- for (RegionListProperty::ChangeContainer::iterator i = change.added.begin(); i != change.added.end(); ++i) {
+ for (RegionListProperty::ChangeContainer::const_iterator i = change.added.begin(); i != change.added.end(); ++i) {
add_region_internal ((*i), (*i)->position());
}
/* remove the removed regions */
- for (RegionListProperty::ChangeContainer::iterator i = change.removed.begin(); i != change.removed.end(); ++i) {
+ for (RegionListProperty::ChangeContainer::const_iterator i = change.removed.begin(); i != change.removed.end(); ++i) {
remove_region (*i);
}
@@ -2488,7 +2488,7 @@ Playlist::uses_source (boost::shared_ptr<const Source> src) const
{
RegionReadLock rlock (const_cast<Playlist*> (this));
- for (set<boost::shared_ptr<Region> >::iterator r = all_regions.begin(); r != all_regions.end(); ++r) {
+ for (set<boost::shared_ptr<Region> >::const_iterator r = all_regions.begin(); r != all_regions.end(); ++r) {
if ((*r)->uses_source (src)) {
return true;
}
@@ -2533,7 +2533,7 @@ Playlist::region_by_id (const ID& id) const
{
/* searches all regions ever added to this playlist */
- for (set<boost::shared_ptr<Region> >::iterator i = all_regions.begin(); i != all_regions.end(); ++i) {
+ for (set<boost::shared_ptr<Region> >::const_iterator i = all_regions.begin(); i != all_regions.end(); ++i) {
if ((*i)->id() == id) {
return *i;
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index f53acebe14..0fbd334879 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2833,7 +2833,7 @@ Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
{
const FedBy& fed_by (other->fed_by());
- for (FedBy::iterator f = fed_by.begin(); f != fed_by.end(); ++f) {
+ for (FedBy::const_iterator f = fed_by.begin(); f != fed_by.end(); ++f) {
boost::shared_ptr<Route> sr = f->r.lock();
if (sr && (sr.get() == this)) {
diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc
index b2c4640880..b586ab196e 100644
--- a/libs/ardour/session_playlists.cc
+++ b/libs/ardour/session_playlists.cc
@@ -221,11 +221,11 @@ SessionPlaylists::get (vector<boost::shared_ptr<Playlist> >& s) const
{
Glib::Threads::Mutex::Lock lm (lock);
- for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
+ for (List::const_iterator i = playlists.begin(); i != playlists.end(); ++i) {
s.push_back (*i);
}
- for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
+ for (List::const_iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
s.push_back (*i);
}
}
@@ -448,11 +448,11 @@ SessionPlaylists::region_use_count (boost::shared_ptr<Region> region) const
Glib::Threads::Mutex::Lock lm (lock);
uint32_t cnt = 0;
- for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
+ for (List::const_iterator i = playlists.begin(); i != playlists.end(); ++i) {
cnt += (*i)->region_use_count (region);
}
- for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
+ for (List::const_iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
cnt += (*i)->region_use_count (region);
}
diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h
index b9d59724dd..63263819ca 100644
--- a/libs/pbd/pbd/sequence_property.h
+++ b/libs/pbd/pbd/sequence_property.h
@@ -94,14 +94,14 @@ class SequenceProperty : public PropertyBase
/* record the change described in our change member */
if (!_changes.added.empty()) {
- for (typename ChangeContainer::iterator i = _changes.added.begin(); i != _changes.added.end(); ++i) {
+ for (typename ChangeContainer::const_iterator i = _changes.added.begin(); i != _changes.added.end(); ++i) {
XMLNode* add_node = new XMLNode ("Add");
child->add_child_nocopy (*add_node);
get_content_as_xml (*i, *add_node);
}
}
if (!_changes.removed.empty()) {
- for (typename ChangeContainer::iterator i = _changes.removed.begin(); i != _changes.removed.end(); ++i) {
+ for (typename ChangeContainer::const_iterator i = _changes.removed.begin(); i != _changes.removed.end(); ++i) {
XMLNode* remove_node = new XMLNode ("Remove");
child->add_child_nocopy (*remove_node);
get_content_as_xml (*i, *remove_node);
@@ -170,7 +170,7 @@ class SequenceProperty : public PropertyBase
with this diff().
*/
- for (typename ChangeContainer::iterator i = a->changes().added.begin(); i != a->changes().added.end(); ++i) {
+ for (typename ChangeContainer::const_iterator i = a->changes().added.begin(); i != a->changes().added.end(); ++i) {
(*i)->DropReferences.connect_same_thread (*cmd, boost::bind (&Destructible::drop_references, cmd));
}
}