diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 21:55:52 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 21:55:52 +0900 |
| commit | fa9f3fb5a3c8912a0a6880ffba9c72f4424ea044 (patch) | |
| tree | deb0b47b085a3a689bf386409734bfd3f72f57d2 /src/CreateRequestCommand.cc | |
| parent | bb5b7eeedb3ce7396007818cbab4f5f5660997a5 (diff) | |
Wrap Command object in std::unique_ptr
Diffstat (limited to 'src/CreateRequestCommand.cc')
| -rw-r--r-- | src/CreateRequestCommand.cc | 11 |
1 files changed, 5 insertions, 6 deletions
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; } |
