1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

All tracks allocated with make_shared, no more make_unique...

... so that we can use Track::SharedPointer without undefined behavior even on
tracks that don't yet belong to any TrackList.

Also fix the return type of function template TrackList::Add and remove some
casts.
This commit is contained in:
Paul Licameli
2018-11-18 23:07:05 -05:00
parent 6f89c48873
commit a0aa69a248
18 changed files with 60 additions and 109 deletions

View File

@@ -23,7 +23,7 @@ class wxWindow;
// Newly constructed WaveTracks that are not yet owned by a TrackList
// are held in unique_ptr not shared_ptr
using NewChannelGroup = std::vector< std::unique_ptr<WaveTrack> >;
using NewChannelGroup = std::vector< std::shared_ptr<WaveTrack> >;
using TrackHolders = std::vector< NewChannelGroup >;