1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 07:01:18 +02:00

Remove some naked new amd delete in: ondemand

This commit is contained in:
Paul Licameli
2016-04-06 19:09:53 -04:00
committed by Paul Licameli
parent f82ff73578
commit 473e955da3
15 changed files with 112 additions and 127 deletions

View File

@@ -408,7 +408,7 @@ int PCMImportFileHandle::Import(TrackFactory *trackFactory,
if(useOD)
{
ODComputeSummaryTask* computeTask=new ODComputeSummaryTask;
auto computeTask = make_movable<ODComputeSummaryTask>();
bool moreThanStereo = mInfo.channels>2;
for (const auto &channel : channels)
{
@@ -416,13 +416,13 @@ int PCMImportFileHandle::Import(TrackFactory *trackFactory,
if(moreThanStereo)
{
//if we have 3 more channels, they get imported on seperate tracks, so we add individual tasks for each.
ODManager::Instance()->AddNewTask(computeTask);
computeTask=new ODComputeSummaryTask;
ODManager::Instance()->AddNewTask(std::move(computeTask));
computeTask = make_movable<ODComputeSummaryTask>();
}
}
//if we have a linked track, we add ONE task.
if(!moreThanStereo)
ODManager::Instance()->AddNewTask(computeTask);
ODManager::Instance()->AddNewTask(std::move(computeTask));
}
}
else {