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/RpcMethodImpl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/RpcMethodImpl.cc') diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc index ddbb8435..d64c6473 100644 --- a/src/RpcMethodImpl.cc +++ b/src/RpcMethodImpl.cc @@ -1312,9 +1312,9 @@ std::shared_ptr ChangeUriRpcMethod::process } } if(addcount && group->getPieceStorage()) { - std::vector commands; + std::vector> commands; group->createNextCommand(commands, e); - e->addCommand(commands); + e->addCommand(std::move(commands)); group->getSegmentMan()->recognizeSegmentFor(s); } std::shared_ptr res = List::g(); @@ -1329,7 +1329,8 @@ std::shared_ptr goingShutdown { // Schedule shutdown after 3seconds to give time to client to // receive RPC response. - e->addRoutineCommand(new TimedHaltCommand(e->newCUID(), e, 3, forceHalt)); + e->addRoutineCommand(make_unique + (e->newCUID(), e, 3, forceHalt)); A2_LOG_INFO("Scheduled shutdown in 3 seconds."); return VLB_OK; } -- cgit