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> >&);
}
int
-Session::destroy_sources (list<boost::shared_ptr<Source> > srcs)
+Session::destroy_sources (list<boost::shared_ptr<Source> > const& srcs)
{
set<boost::shared_ptr<Region> > relevant_regions;
- for (list<boost::shared_ptr<Source> >::iterator s = srcs.begin(); s != srcs.end(); ++s) {
+ for (list<boost::shared_ptr<Source> >::const_iterator s = srcs.begin(); s != srcs.end(); ++s) {
RegionFactory::get_regions_using_source (*s, relevant_regions);
}
r = tmp;
}
- for (list<boost::shared_ptr<Source> >::iterator s = srcs.begin(); s != srcs.end(); ) {
+ for (list<boost::shared_ptr<Source> >::const_iterator s = srcs.begin(); s != srcs.end(); ++s) {
{
Glib::Threads::Mutex::Lock ls (source_lock);
(*s)->mark_for_remove ();
(*s)->drop_references ();
SourceRemoved(*s);
-
- s = srcs.erase (s);
}
return 0;