Prefer const iterators

This commit is contained in:
Robin Gareus
2020-02-25 04:15:30 +01:00
parent 7e4728027c
commit 8e1a2d7caa
2 changed files with 2 additions and 2 deletions

View File

@@ -4488,7 +4488,7 @@ Session::count_sources_by_origin (const string& path)
uint32_t cnt = 0;
Glib::Threads::Mutex::Lock lm (source_lock);
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) {
for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
boost::shared_ptr<FileSource> fs
= boost::dynamic_pointer_cast<FileSource>(i->second);

View File

@@ -2335,7 +2335,7 @@ Session::get_sources_as_xml ()
XMLNode* node = new XMLNode (X_("Sources"));
Glib::Threads::Mutex::Lock lm (source_lock);
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) {
for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
node->add_child_nocopy (i->second->get_state());
}