diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-28 16:05:35 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-28 16:05:35 -0400 |
commit | b2be7cb6bd797f40d998a80d61cc88a75632b193 (patch) | |
tree | 1ad2b8c28917aeef620e555e303088d8a534cfb7 /libs/ardour/playlist.cc | |
parent | 54d5f36311d041ce3d5fa3e6ed14fde30bcb70b7 (diff) |
remove debug output and add a few suggestive comments
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 7267ec8cdf..58405e4755 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -2675,7 +2675,13 @@ Playlist::uses_source (boost::shared_ptr<const Source> src, bool shallow) const RegionReadLock rlock (const_cast<Playlist*> (this)); for (set<boost::shared_ptr<Region> >::const_iterator r = all_regions.begin(); r != all_regions.end(); ++r) { - if ((*r)->uses_source (src, true)) { + /* Note: passing the second argument as false can cause at best + incredibly deep and time-consuming recursion, and at worst + cycles if the user has managed to create cycles of reference + between compound regions. We generally only this during + cleanup, and @param shallow is passed as true. + */ + if ((*r)->uses_source (src, shallow)) { return true; } } |