summaryrefslogtreecommitdiff
path: root/src/HttpProxyRequestConnectChain.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 21:55:52 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 21:55:52 +0900
commitfa9f3fb5a3c8912a0a6880ffba9c72f4424ea044 (patch)
treedeb0b47b085a3a689bf386409734bfd3f72f57d2 /src/HttpProxyRequestConnectChain.h
parentbb5b7eeedb3ce7396007818cbab4f5f5660997a5 (diff)
Wrap Command object in std::unique_ptr
Diffstat (limited to 'src/HttpProxyRequestConnectChain.h')
-rw-r--r--src/HttpProxyRequestConnectChain.h4
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;
}
};