1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-17 08:17:59 +01:00

TrackList constructed only by factory function, to avoid more trouble

This commit is contained in:
Paul Licameli
2017-07-14 21:47:47 -04:00
parent 84a6bad8a0
commit 8bf3791edf
10 changed files with 42 additions and 42 deletions

View File

@@ -41,7 +41,7 @@ WX_DECLARE_HASH_SET(ConstBlockFilePtr, wxPointerHash, wxPointerEqual, Set );
struct UndoStackElem {
UndoStackElem(std::unique_ptr<TrackList> &&tracks_,
UndoStackElem(std::shared_ptr<TrackList> &&tracks_,
const wxString &description_,
const wxString &shortDescription_,
const SelectedRegion &selectedRegion_,
@@ -231,7 +231,7 @@ void UndoManager::ModifyState(const TrackList * l,
stack[current]->state.tracks.reset();
// Duplicate
auto tracksCopy = std::make_unique<TrackList>();
auto tracksCopy = TrackList::Create();
TrackListConstIterator iter(l);
const Track *t = iter.First();
while (t) {
@@ -275,7 +275,7 @@ void UndoManager::PushState(const TrackList * l,
RemoveStateAt(i);
}
auto tracksCopy = std::make_unique<TrackList>();
auto tracksCopy = TrackList::Create();
TrackListConstIterator iter(l);
const Track *t = iter.First();
while (t) {