mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
some more C++11 loop-auto-fication
This commit is contained in:
parent
117c751293
commit
b4291cfb32
1 changed files with 22 additions and 16 deletions
|
|
@ -5061,14 +5061,15 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PlaylistSet::iterator pl = freezelist.begin(); pl != freezelist.end(); ++pl) {
|
for (auto & pl : freezelist) {
|
||||||
(*pl)->thaw ();
|
|
||||||
|
pl->thaw ();
|
||||||
|
|
||||||
/* We might have removed regions, which alters other regions' layering_index,
|
/* We might have removed regions, which alters other regions' layering_index,
|
||||||
so we need to do a recursive diff here.
|
so we need to do a recursive diff here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(*pl)->rdiff_and_add_command (_session);
|
pl->rdiff_and_add_command (_session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9695,42 +9696,47 @@ Editor::do_ripple (std::shared_ptr<Playlist> target_playlist, timepos_t const &
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add_to_command) {
|
if (add_to_command) {
|
||||||
for (auto const& p : playlists) {
|
for (auto & p : playlists) {
|
||||||
|
std::cerr << "cc for " << p->name() << std::endl;
|
||||||
p->clear_changes ();
|
p->clear_changes ();
|
||||||
p->clear_owned_changes ();
|
p->clear_owned_changes ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto const& p : playlists) {
|
for (auto & p : playlists) {
|
||||||
p->freeze ();
|
p->freeze ();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PlaylistSet::iterator p = playlists.begin(); p != playlists.end(); ++p) {
|
for (auto & p : playlists) {
|
||||||
|
|
||||||
|
std::cerr << "ripple " << p->name() << " @ " << p << std::endl;
|
||||||
|
|
||||||
/* exclude list is only for the target */
|
/* exclude list is only for the target */
|
||||||
|
|
||||||
if ((*p) == target_playlist) {
|
if (p == target_playlist) {
|
||||||
|
|
||||||
(*p)->ripple (at, distance, exclude);
|
p->ripple (at, distance, exclude);
|
||||||
|
|
||||||
/* caller may put the target playlist into the undo
|
/* caller may put the target playlist into the undo
|
||||||
* history, so only do this if asked
|
* history, so only do this if asked
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (add_to_command) {
|
if (add_to_command) {
|
||||||
(*p)->rdiff_and_add_command (_session);
|
std::cerr << "\tatc\n";
|
||||||
|
p->rdiff_and_add_command (_session);
|
||||||
}
|
}
|
||||||
} else if (affected_pls.find (*p) == affected_pls.end ()) {
|
} else if (affected_pls.find (p) == affected_pls.end ()) {
|
||||||
(*p)->clear_changes ();
|
std::cerr << "\trac\n";
|
||||||
(*p)->clear_owned_changes ();
|
p->clear_changes ();
|
||||||
(*p)->ripple (at, distance, 0);
|
p->clear_owned_changes ();
|
||||||
(*p)->rdiff_and_add_command (_session);
|
p->ripple (at, distance, 0);
|
||||||
|
p->rdiff_and_add_command (_session);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PlaylistSet::iterator p = playlists.begin(); p != playlists.end(); ++p) {
|
for (auto & p : playlists) {
|
||||||
(*p)->thaw ();
|
p->thaw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ripple marks & ranges if appropriate */
|
/* Ripple marks & ranges if appropriate */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue