summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 01:16:48 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 01:16:48 +0900
commita479473949a8b82b1943c7d57966acfbb58f6c81 (patch)
treea6486fd0b08aae314493fff622cf06201b450fb3 /src/RequestGroup.cc
parentc36370ef60ae4f8c1ed251a404ccddff671194a1 (diff)
Use std::unique_ptr for URISelector instead of std::shared_ptr
Diffstat (limited to 'src/RequestGroup.cc')
-rw-r--r--src/RequestGroup.cc6
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()