From 07d270c87e6f9184aea4ca17eb26e466712e8db2 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 22 Jun 2013 01:10:38 +0900 Subject: Require -std=c++11 and use std::shared_ptr instead of SharedHandle --- src/BtCheckIntegrityEntry.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/BtCheckIntegrityEntry.cc') diff --git a/src/BtCheckIntegrityEntry.cc b/src/BtCheckIntegrityEntry.cc index f7428bff..8121d869 100644 --- a/src/BtCheckIntegrityEntry.cc +++ b/src/BtCheckIntegrityEntry.cc @@ -51,19 +51,19 @@ BtCheckIntegrityEntry::~BtCheckIntegrityEntry() {} void BtCheckIntegrityEntry::onDownloadIncomplete (std::vector& commands, DownloadEngine* e) { - const SharedHandle& ps = getRequestGroup()->getPieceStorage(); + const std::shared_ptr& ps = getRequestGroup()->getPieceStorage(); ps->onDownloadIncomplete(); if(getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY)) { return; } - const SharedHandle& diskAdaptor = ps->getDiskAdaptor(); + const std::shared_ptr& diskAdaptor = ps->getDiskAdaptor(); if(diskAdaptor->isReadOnlyEnabled()) { // Now reopen DiskAdaptor with read only disabled. diskAdaptor->closeFile(); diskAdaptor->disableReadOnly(); diskAdaptor->openFile(); } - SharedHandle entry + std::shared_ptr entry (new BtFileAllocationEntry(getRequestGroup())); proceedFileAllocation(commands, entry, e); } @@ -77,7 +77,7 @@ void BtCheckIntegrityEntry::onDownloadFinished // behavior. if(!getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY) && getRequestGroup()->getOption()->getAsBool(PREF_BT_HASH_CHECK_SEED)) { - SharedHandle entry + std::shared_ptr entry (new BtFileAllocationEntry(getRequestGroup())); proceedFileAllocation(commands, entry, e); } -- cgit