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/HttpProxyRequestConnectChain.h | |
| parent | bb5b7eeedb3ce7396007818cbab4f5f5660997a5 (diff) | |
Wrap Command object in std::unique_ptr
Diffstat (limited to 'src/HttpProxyRequestConnectChain.h')
| -rw-r--r-- | src/HttpProxyRequestConnectChain.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpProxyRequestConnectChain.h b/src/HttpProxyRequestConnectChain.h index 9e6e804d..59cbc4c0 100644 --- a/src/HttpProxyRequestConnectChain.h +++ b/src/HttpProxyRequestConnectChain.h @@ -47,7 +47,7 @@ struct HttpProxyRequestConnectChain : public ControlChain<ConnectCommand*> { virtual ~HttpProxyRequestConnectChain() {} virtual int run(ConnectCommand* t, DownloadEngine* e) { - HttpProxyRequestCommand* c = new HttpProxyRequestCommand + auto c = make_unique<HttpProxyRequestCommand> (t->getCuid(), t->getRequest(), t->getFileEntry(), @@ -57,7 +57,7 @@ struct HttpProxyRequestConnectChain : public ControlChain<ConnectCommand*> { t->getSocket()); c->setStatus(Command::STATUS_ONESHOT_REALTIME); e->setNoWait(true); - e->addCommand(c); + e->addCommand(std::move(c)); return 0; } }; |
