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