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:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user