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/StreamFileAllocationEntry.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/StreamFileAllocationEntry.cc') diff --git a/src/StreamFileAllocationEntry.cc b/src/StreamFileAllocationEntry.cc index b93df899..9afa6f29 100644 --- a/src/StreamFileAllocationEntry.cc +++ b/src/StreamFileAllocationEntry.cc @@ -69,17 +69,17 @@ void StreamFileAllocationEntry::prepareForNextAction if(getNextCommand()) { // Reset download start time of PeerStat because it is started // before file allocation begins. - const SharedHandle& dctx = + const std::shared_ptr& dctx = getRequestGroup()->getDownloadContext(); - const std::vector >& fileEntries = + const std::vector >& fileEntries = dctx->getFileEntries(); - for(std::vector >::const_iterator i = + for(std::vector >::const_iterator i = fileEntries.begin(), eoi = fileEntries.end(); i != eoi; ++i) { const FileEntry::InFlightRequestSet& reqs = (*i)->getInFlightRequests(); for(FileEntry::InFlightRequestSet::iterator j = reqs.begin(), eoj = reqs.end(); j != eoj; ++j) { - const SharedHandle& peerStat = (*j)->getPeerStat(); + const std::shared_ptr& peerStat = (*j)->getPeerStat(); if(peerStat) { peerStat->downloadStart(); } -- cgit