1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

TrackList holds smart pointers to tracks, Add() only takes rvalue refs to such

This commit is contained in:
Paul Licameli
2016-03-13 11:08:21 -04:00
parent 7d1ea7b82e
commit a6ca36cdab
10 changed files with 209 additions and 183 deletions

View File

@@ -319,9 +319,9 @@ bool LabelDialog::TransferDataFromWindow()
wxString name = mTrackNames[tndx + 1].AfterFirst(wxT('-')).Mid(1);
// Create the NEW track and add to track list
LabelTrack *newTrack = mFactory.NewLabelTrack().release();
auto newTrack = mFactory.NewLabelTrack();
newTrack->SetName(name);
mTracks->Add(newTrack);
mTracks->Add(std::move(newTrack));
tndx++;
}