diff options
| author | Nils Maier <maierman@web.de> | 2013-08-25 18:00:46 +0200 |
|---|---|---|
| committer | Nils Maier <maierman@web.de> | 2013-09-20 23:06:49 +0200 |
| commit | 3590077d5c43d492b3e357d1a50afca4a7d1cfcf (patch) | |
| tree | 592516aa08b74c7e90c41a9b50c227f3f5b877b0 /src/SessionSerializer.cc | |
| parent | a76eeb2b8106dd725097750c3ee4958e505e3c85 (diff) | |
More auto-converts by cpp11-migrate
Diffstat (limited to 'src/SessionSerializer.cc')
| -rw-r--r-- | src/SessionSerializer.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/SessionSerializer.cc b/src/SessionSerializer.cc index d70cc411..cf02548b 100644 --- a/src/SessionSerializer.cc +++ b/src/SessionSerializer.cc @@ -266,9 +266,7 @@ bool SessionSerializer::save(IOFile& fp) const { std::set<a2_gid_t> metainfoCache; const DownloadResultList& results = rgman_->getDownloadResults(); - for(DownloadResultList::const_iterator itr = results.begin(), - eoi = results.end(); itr != eoi; ++itr) { - const std::shared_ptr<DownloadResult>& dr = *itr; + for(const auto& dr : results) { if(dr->result == error_code::FINISHED || dr->result == error_code::REMOVED) { if(dr->option->getAsBool(PREF_FORCE_SAVE)) { @@ -296,9 +294,7 @@ bool SessionSerializer::save(IOFile& fp) const { // Save active downloads. const RequestGroupList& groups = rgman_->getRequestGroups(); - for(RequestGroupList::const_iterator itr = groups.begin(), - eoi = groups.end(); itr != eoi; ++itr) { - const std::shared_ptr<RequestGroup>& rg = *itr; + for(const auto& rg : groups) { std::shared_ptr<DownloadResult> dr = rg->createDownloadResult(); bool stopped = dr->result == error_code::FINISHED || dr->result == error_code::REMOVED; @@ -312,9 +308,7 @@ bool SessionSerializer::save(IOFile& fp) const } if(saveWaiting_) { const RequestGroupList& groups = rgman_->getReservedGroups(); - for(RequestGroupList::const_iterator itr = groups.begin(), - eoi = groups.end(); itr != eoi; ++itr) { - const std::shared_ptr<RequestGroup>& rg = *itr; + for(const auto& rg : groups) { std::shared_ptr<DownloadResult> result = rg->createDownloadResult(); if(!writeDownloadResult(fp, metainfoCache, result)) { return false; |
