From 162c138362955eede9ca8ec2e4b5e804688eda32 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 6 Jul 2013 19:02:39 +0900 Subject: BtRegistry: Use std::unique_ptr for BtObject --- src/RequestGroup.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/RequestGroup.cc') diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index aa548611..aef696ec 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -350,16 +350,14 @@ void RequestGroup::createInitialCommand btAnnouncePtr->shuffleAnnounce(); assert(!btRegistry->get(gid_->getNumericId())); - btRegistry->put - (gid_->getNumericId(), std::shared_ptr - (new BtObject - (downloadContext_, - pieceStorage_, - peerStorage, - btAnnounce, - btRuntime, - (progressInfoFile ? - progressInfoFile : progressInfoFile_)))); + btRegistry->put(gid_->getNumericId(), make_unique + (downloadContext_, + pieceStorage_, + peerStorage, + btAnnounce, + btRuntime, + (progressInfoFile ? + progressInfoFile : progressInfoFile_))); if(metadataGetMode) { if(option_->getAsBool(PREF_ENABLE_DHT) || (!e->getOption()->getAsBool(PREF_DISABLE_IPV6) && -- cgit