diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-06 19:02:39 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-06 19:09:39 +0900 |
| commit | 162c138362955eede9ca8ec2e4b5e804688eda32 (patch) | |
| tree | e3fb196ac630413f0b05645a914ec096a67cceca /src/RequestGroup.cc | |
| parent | cc3cd8a58b11d639c327ca6debb041747c3828d6 (diff) | |
BtRegistry: Use std::unique_ptr for BtObject
Diffstat (limited to 'src/RequestGroup.cc')
| -rw-r--r-- | src/RequestGroup.cc | 18 |
1 files changed, 8 insertions, 10 deletions
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<BtObject> - (new BtObject - (downloadContext_, - pieceStorage_, - peerStorage, - btAnnounce, - btRuntime, - (progressInfoFile ? - progressInfoFile : progressInfoFile_)))); + btRegistry->put(gid_->getNumericId(), make_unique<BtObject> + (downloadContext_, + pieceStorage_, + peerStorage, + btAnnounce, + btRuntime, + (progressInfoFile ? + progressInfoFile : progressInfoFile_))); if(metadataGetMode) { if(option_->getAsBool(PREF_ENABLE_DHT) || (!e->getOption()->getAsBool(PREF_DISABLE_IPV6) && |
