summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/session.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-12-25 17:57:10 +0100
committerRobin Gareus <robin@gareus.org>2019-12-25 17:57:10 +0100
commitdf17e3f041ab8f94fcc730dada2b53b57ac9113d (patch)
tree8236ae2bf93652005bad8bef1ae98bb88c6fb43b /libs/ardour/ardour/session.h
parentc9c8cd2777706d15e2e9df56dabc15b7f472dfcb (diff)
Prevent copy-construction of sources to be destroyed list
destroy_sources () is only called from Session::remove_last_capture (). The list of sources to be destroyed is the local scope of that method and will hold a reference to the object. copy-construct the list and removing elements one by one from the copy is only unnecessary overhead.
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r--libs/ardour/ardour/session.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 14eecbae6a..9326c9b948 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -805,7 +805,7 @@ public:
int cleanup_sources (CleanupReport&);
int cleanup_trash_sources (CleanupReport&);
- int destroy_sources (std::list<boost::shared_ptr<Source> >);
+ int destroy_sources (std::list<boost::shared_ptr<Source> > const&);
int remove_last_capture ();
void get_last_capture_sources (std::list<boost::shared_ptr<Source> >&);