diff options
| author | Nils Maier <maierman@web.de> | 2013-08-21 05:06:53 +0200 |
|---|---|---|
| committer | Nils Maier <maierman@web.de> | 2013-08-21 05:56:17 +0200 |
| commit | 8526ceeb452d23d7aa73d01c6cb0fc8ae5e0377b (patch) | |
| tree | 825b4f5d2a0f18331fbbf24773e80ee0b44b50dc /src/StreamFileAllocationEntry.cc | |
| parent | d8f44ef4f6c5ad86b08658ecba41a84b775b6e69 (diff) | |
Convert to autos and ranged loops
Diffstat (limited to 'src/StreamFileAllocationEntry.cc')
| -rw-r--r-- | src/StreamFileAllocationEntry.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/StreamFileAllocationEntry.cc b/src/StreamFileAllocationEntry.cc index d30018a2..dfe1f679 100644 --- a/src/StreamFileAllocationEntry.cc +++ b/src/StreamFileAllocationEntry.cc @@ -73,13 +73,10 @@ void StreamFileAllocationEntry::prepareForNextAction getRequestGroup()->getDownloadContext(); const std::vector<std::shared_ptr<FileEntry> >& fileEntries = dctx->getFileEntries(); - for(std::vector<std::shared_ptr<FileEntry> >::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 std::shared_ptr<PeerStat>& peerStat = (*j)->getPeerStat(); + for(auto & f : fileEntries) { + const auto& reqs = f->getInFlightRequests(); + for(auto & req : reqs) { + const std::shared_ptr<PeerStat>& peerStat = req->getPeerStat(); if(peerStat) { peerStat->downloadStart(); } |
