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

Track cut and copy functions return a unique_ptr argument...

... Because they are factory functions.
This commit is contained in:
Paul Licameli
2016-03-02 15:36:44 -05:00
parent 5ef4dd46a5
commit 3015a9c8d9
15 changed files with 144 additions and 153 deletions

View File

@@ -136,11 +136,10 @@ bool EffectRepeat::Process()
continue;
}
Track *dest;
track->Copy(mT0, mT1, &dest);
auto dest = track->Copy(mT0, mT1);
for(int j=0; j<repeatCount; j++)
{
if (!track->Paste(tc, dest) ||
if (!track->Paste(tc, dest.get()) ||
TrackProgress(nTrack, j / repeatCount)) // TrackProgress returns true on Cancel.
{
bGoodResult = false;
@@ -150,7 +149,6 @@ bool EffectRepeat::Process()
}
if (tc > maxDestLen)
maxDestLen = tc;
delete dest;
nTrack++;
}
else if (t->IsSyncLockSelected())