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 323977 7a7511f0ab14e9b4e4d25b13a74d74e59c35a298
parent 323976 f6bafacee6583f5e671cfeeb13717bd692a3311c
child 323978 955818a2e3b1a7bd846ff8973395d41c932d8cee
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersfroydnj
bugs1319752
milestone53.0a1
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();