summaryrefslogtreecommitdiff
path: root/src/BtCheckIntegrityEntry.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/BtCheckIntegrityEntry.cc
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/BtCheckIntegrityEntry.cc')
-rw-r--r--src/BtCheckIntegrityEntry.cc8
1 files changed, 4 insertions, 4 deletions
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<Command*>& commands, DownloadEngine* e)
{
- const SharedHandle<PieceStorage>& ps = getRequestGroup()->getPieceStorage();
+ const std::shared_ptr<PieceStorage>& ps = getRequestGroup()->getPieceStorage();
ps->onDownloadIncomplete();
if(getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY)) {
return;
}
- const SharedHandle<DiskAdaptor>& diskAdaptor = ps->getDiskAdaptor();
+ const std::shared_ptr<DiskAdaptor>& diskAdaptor = ps->getDiskAdaptor();
if(diskAdaptor->isReadOnlyEnabled()) {
// Now reopen DiskAdaptor with read only disabled.
diskAdaptor->closeFile();
diskAdaptor->disableReadOnly();
diskAdaptor->openFile();
}
- SharedHandle<BtFileAllocationEntry> entry
+ std::shared_ptr<BtFileAllocationEntry> 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<BtFileAllocationEntry> entry
+ std::shared_ptr<BtFileAllocationEntry> entry
(new BtFileAllocationEntry(getRequestGroup()));
proceedFileAllocation(commands, entry, e);
}