From fa9f3fb5a3c8912a0a6880ffba9c72f4424ea044 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 23 Jun 2013 21:55:52 +0900 Subject: Wrap Command object in std::unique_ptr --- src/CreateRequestCommand.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/CreateRequestCommand.cc') diff --git a/src/CreateRequestCommand.cc b/src/CreateRequestCommand.cc index 1845af7c..90cbc556 100644 --- a/src/CreateRequestCommand.cc +++ b/src/CreateRequestCommand.cc @@ -105,16 +105,15 @@ bool CreateRequestCommand::executeInternal() // counted (1 for pooled and another one in this command) and // AbstractCommand::execute() will behave badly. resetRequest(); - getDownloadEngine()->addCommand(this); + addCommandSelf(); return false; } - Command* command = - InitiateConnectionCommandFactory::createInitiateConnectionCommand - (getCuid(), getRequest(), getFileEntry(), getRequestGroup(), - getDownloadEngine()); getDownloadEngine()->setNoWait(true); - getDownloadEngine()->addCommand(command); + getDownloadEngine()->addCommand + (InitiateConnectionCommandFactory::createInitiateConnectionCommand + (getCuid(), getRequest(), getFileEntry(), getRequestGroup(), + getDownloadEngine())); return true; } -- cgit