13
0

avoid intermediate unnecessary shared_ptr

This commit is contained in:
Paul Davis 2021-08-27 17:25:51 -06:00
parent fad71ce748
commit cd792f3713

View File

@ -764,8 +764,7 @@ Playlist::add_region_internal (boost::shared_ptr<Region> region, timepos_t const
RegionSortByPosition cmp; RegionSortByPosition cmp;
if (!first_set_state) { if (!first_set_state) {
boost::shared_ptr<Playlist> foo (shared_from_this ()); region->set_playlist (boost::weak_ptr<Playlist> (shared_from_this()));
region->set_playlist (boost::weak_ptr<Playlist> (foo));
} }
region->set_position (position); region->set_position (position);