diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 01:16:48 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 01:16:48 +0900 |
| commit | a479473949a8b82b1943c7d57966acfbb58f6c81 (patch) | |
| tree | a6486fd0b08aae314493fff622cf06201b450fb3 /src/RequestGroup.cc | |
| parent | c36370ef60ae4f8c1ed251a404ccddff671194a1 (diff) | |
Use std::unique_ptr for URISelector instead of std::shared_ptr
Diffstat (limited to 'src/RequestGroup.cc')
| -rw-r--r-- | src/RequestGroup.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index c79b690e..6efe900b 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -136,7 +136,7 @@ RequestGroup::RequestGroup(const std::shared_ptr<GroupId>& gid, forceHaltRequested_(false), haltReason_(RequestGroup::NONE), pauseRequested_(false), - uriSelector_(new InorderURISelector()), + uriSelector_(make_unique<InorderURISelector>()), lastModifiedTime_(Time::null()), fileNotFoundCount_(0), timeout_(option->getAsInt(PREF_TIMEOUT)), @@ -1212,9 +1212,9 @@ void RequestGroup::reportDownloadFinished() #endif // ENABLE_BITTORRENT } -void RequestGroup::setURISelector(const std::shared_ptr<URISelector>& uriSelector) +void RequestGroup::setURISelector(std::unique_ptr<URISelector> uriSelector) { - uriSelector_ = uriSelector; + uriSelector_ = std::move(uriSelector); } void RequestGroup::applyLastModifiedTimeToLocalFiles() |
