From 8d866f58a2925f23f89e9e60e69f4eb412e103b2 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 12 Oct 2022 16:51:04 -0600 Subject: [PATCH] fix mis-use of locally-scopped variable name in auto for loop --- libs/ardour/playlist.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 71f5cdd498..802d76b5c8 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -3063,9 +3063,9 @@ Playlist::find_next_top_layer_position (timepos_t const & t) const } boost::shared_ptr -Playlist::combine (const RegionList& r) +Playlist::combine (const RegionList& rl) { - if (r.empty()) { + if (rl.empty()) { return boost::shared_ptr(); } @@ -3073,7 +3073,7 @@ Playlist::combine (const RegionList& r) PropertyList plist; SourceList::size_type channels = 0; uint32_t layer = 0; - timepos_t earliest_position = timepos_t::max (r.front()->position().time_domain()); + timepos_t earliest_position = timepos_t::max (rl.front()->position().time_domain()); vector old_and_new_regions; vector > originals; vector > copies; @@ -3083,7 +3083,7 @@ Playlist::combine (const RegionList& r) /* find the maximum depth of all the regions we're combining */ - for (RegionList::const_iterator i = r.begin(); i != r.end(); ++i) { + for (RegionList::const_iterator i = rl.begin(); i != rl.end(); ++i) { max_level = max (max_level, (*i)->max_source_level()); } @@ -3092,7 +3092,7 @@ Playlist::combine (const RegionList& r) boost::shared_ptr pl = PlaylistFactory::create (_type, _session, parent_name, true); - for (auto const & r : r) { + for (auto const & r : rl) { earliest_position = min (earliest_position, r->position()); } @@ -3106,7 +3106,7 @@ Playlist::combine (const RegionList& r) * route_time_axis passes 'selected_regions' - which is not sorted. * here we need the top-most first, then every layer's region sorted by position. */ - RegionList sorted(r); + RegionList sorted(rl); sorted.sort(RegionSortByLayerAndPosition()); for (auto const & original_region : sorted) { @@ -3177,7 +3177,7 @@ Playlist::combine (const RegionList& r) freeze (); - for (auto const & reg : r) { + for (auto const & reg : rl) { remove_region (reg); }