Bug 1319752 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in startupcache/. r=froydnj
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 23 Nov 2016 14:22:23 +0200
changeset 368935 7a7511f0ab14e9b4e4d25b13a74d74e59c35a298
parent 368934 f6bafacee6583f5e671cfeeb13717bd692a3311c
child 368936 955818a2e3b1a7bd846ff8973395d41c932d8cee
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1319752
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1319752 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in startupcache/. r=froydnj MozReview-Commit-ID: G0hV6yoZIVg
startupcache/StartupCache.cpp
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -435,18 +435,18 @@ StartupCache::WriteToDisk()
     return;
   }
 
   CacheWriteHolder holder;
   holder.stream = stream;
   holder.writer = zipW;
   holder.time = now;
 
-  for (auto key = mPendingWrites.begin(); key != mPendingWrites.end(); key++) {
-    CacheCloseHelper(*key, mTable.Get(*key), &holder);
+  for (auto& key : mPendingWrites) {
+    CacheCloseHelper(key, mTable.Get(key), &holder);
   }
   mPendingWrites.Clear();
   mTable.Clear();
 
   // Close the archive so Windows doesn't choke.
   mArchive = nullptr;
   zipW->Close();