summaryrefslogtreecommitdiff
path: root/src/UTMetadataPostDownloadHandler.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 00:59:55 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 00:59:55 +0900
commitbef6236da80cb18a3212bde7c33c556883cbd536 (patch)
tree8faeefde90feeaeb0d7c52d75dcc5189f8c25ea0 /src/UTMetadataPostDownloadHandler.cc
parent1a299c4d7cf5ab8d130e678d152c4c47ae3430ea (diff)
DownloadContext::attrs_ now holds std::unique_ptr
DownloadContext::getAttribute() returns a raw pointer.
Diffstat (limited to 'src/UTMetadataPostDownloadHandler.cc')
-rw-r--r--src/UTMetadataPostDownloadHandler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UTMetadataPostDownloadHandler.cc b/src/UTMetadataPostDownloadHandler.cc
index da9f1a4a..82084243 100644
--- a/src/UTMetadataPostDownloadHandler.cc
+++ b/src/UTMetadataPostDownloadHandler.cc
@@ -59,7 +59,7 @@ bool UTMetadataPostDownloadHandler::Criteria::match
const std::shared_ptr<DownloadContext>& dctx =
requestGroup->getDownloadContext();
if(dctx->hasAttribute(CTX_ATTR_BT)) {
- std::shared_ptr<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
+ auto attrs = bittorrent::getTorrentAttrs(dctx);
if(attrs->metadata.empty()) {
return true;
}
@@ -77,7 +77,7 @@ void UTMetadataPostDownloadHandler::getNextRequestGroups
(std::vector<std::shared_ptr<RequestGroup> >& groups, RequestGroup* requestGroup)
{
const std::shared_ptr<DownloadContext>& dctx =requestGroup->getDownloadContext();
- std::shared_ptr<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
+ auto attrs = bittorrent::getTorrentAttrs(dctx);
std::string metadata =
util::toString(requestGroup->getPieceStorage()->getDiskAdaptor());
std::string torrent = bittorrent::metadata2Torrent(metadata, attrs);