mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-17 00:07:54 +01:00
TrackList constructed only by factory function, to avoid more trouble
This commit is contained in:
@@ -762,10 +762,12 @@ TrackList::TrackList()
|
||||
{
|
||||
}
|
||||
|
||||
TrackList::TrackList(const TrackList &that)
|
||||
: ListOfTracks{}
|
||||
// Factory function
|
||||
std::shared_ptr<TrackList> TrackList::Create()
|
||||
{
|
||||
DoAssign(that);
|
||||
std::shared_ptr<TrackList> result{ safenew TrackList{} };
|
||||
result->mSelf = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
TrackList& TrackList::operator= (const TrackList &that)
|
||||
@@ -777,11 +779,6 @@ TrackList& TrackList::operator= (const TrackList &that)
|
||||
return *this;
|
||||
}
|
||||
|
||||
TrackList::TrackList(TrackList &&that)
|
||||
{
|
||||
Swap(that);
|
||||
}
|
||||
|
||||
TrackList &TrackList::operator= (TrackList &&that)
|
||||
{
|
||||
if (this != &that) {
|
||||
|
||||
Reference in New Issue
Block a user