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 323895 7a7511f0ab14e9b4e4d25b13a74d74e59c35a298
parent 323894 f6bafacee6583f5e671cfeeb13717bd692a3311c
child 323896 955818a2e3b1a7bd846ff8973395d41c932d8cee
push id34560
push userbpostelnicu@mozilla.com
push dateWed, 23 Nov 2016 13:27:50 +0000
treeherderautoland@955818a2e3b1 [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();