summaryrefslogtreecommitdiff
path: root/src/FileAllocationCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileAllocationCommand.cc')
-rw-r--r--src/FileAllocationCommand.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/FileAllocationCommand.cc b/src/FileAllocationCommand.cc
index 54c4e7a5..b76357cc 100644
--- a/src/FileAllocationCommand.cc
+++ b/src/FileAllocationCommand.cc
@@ -74,15 +74,13 @@ bool FileAllocationCommand::executeInternal()
getRequestGroup()->getTotalLength()));
getDownloadEngine()->getFileAllocationMan()->dropPickedEntry();
- std::vector<Command*>* commands = new std::vector<Command*>();
- auto_delete_container<std::vector<Command*> > commandsDel(commands);
- fileAllocationEntry_->prepareForNextAction(*commands, getDownloadEngine());
- getDownloadEngine()->addCommand(*commands);
- commands->clear();
+ std::vector<std::unique_ptr<Command>> commands;
+ fileAllocationEntry_->prepareForNextAction(commands, getDownloadEngine());
+ getDownloadEngine()->addCommand(std::move(commands));
getDownloadEngine()->setNoWait(true);
return true;
} else {
- getDownloadEngine()->addCommand(this);
+ getDownloadEngine()->addCommand(std::unique_ptr<Command>(this));
return false;
}
}