summaryrefslogtreecommitdiff
path: root/src/UTMetadataPostDownloadHandler.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
commit07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch)
tree2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/UTMetadataPostDownloadHandler.cc
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/UTMetadataPostDownloadHandler.cc')
-rw-r--r--src/UTMetadataPostDownloadHandler.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/UTMetadataPostDownloadHandler.cc b/src/UTMetadataPostDownloadHandler.cc
index 0557a1b1..da9f1a4a 100644
--- a/src/UTMetadataPostDownloadHandler.cc
+++ b/src/UTMetadataPostDownloadHandler.cc
@@ -56,10 +56,10 @@ namespace aria2 {
bool UTMetadataPostDownloadHandler::Criteria::match
(const RequestGroup* requestGroup) const
{
- const SharedHandle<DownloadContext>& dctx =
+ const std::shared_ptr<DownloadContext>& dctx =
requestGroup->getDownloadContext();
if(dctx->hasAttribute(CTX_ATTR_BT)) {
- SharedHandle<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
+ std::shared_ptr<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
if(attrs->metadata.empty()) {
return true;
}
@@ -69,15 +69,15 @@ bool UTMetadataPostDownloadHandler::Criteria::match
UTMetadataPostDownloadHandler::UTMetadataPostDownloadHandler()
{
- SharedHandle<Criteria> cri(new Criteria());
+ std::shared_ptr<Criteria> cri(new Criteria());
setCriteria(cri);
}
void UTMetadataPostDownloadHandler::getNextRequestGroups
-(std::vector<SharedHandle<RequestGroup> >& groups, RequestGroup* requestGroup)
+(std::vector<std::shared_ptr<RequestGroup> >& groups, RequestGroup* requestGroup)
{
- const SharedHandle<DownloadContext>& dctx =requestGroup->getDownloadContext();
- SharedHandle<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
+ const std::shared_ptr<DownloadContext>& dctx =requestGroup->getDownloadContext();
+ std::shared_ptr<TorrentAttribute> attrs = bittorrent::getTorrentAttrs(dctx);
std::string metadata =
util::toString(requestGroup->getPieceStorage()->getDiskAdaptor());
std::string torrent = bittorrent::metadata2Torrent(metadata, attrs);
@@ -93,7 +93,7 @@ void UTMetadataPostDownloadHandler::getNextRequestGroups
}
}
if(!requestGroup->getOption()->getAsBool(PREF_BT_METADATA_ONLY)) {
- std::vector<SharedHandle<RequestGroup> > newRgs;
+ std::vector<std::shared_ptr<RequestGroup> > newRgs;
// Don't adjust announce URI because it has been done when
// RequestGroup is created with magnet URI.
createRequestGroupForBitTorrent(newRgs, requestGroup->getOption(),