about summary refs log tree commit diff
path: root/src/nix-daemon
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-17T17·24+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-17T18·13+0200
commit6bd2c7bb386de16310fa5534275e6e638be60862 (patch)
tree0a12144dfb4e8d1b069bc09d583b522b5c158b28 /src/nix-daemon
parent1511aa9f488ba0762c2da0bf8ab61b5fde47305d (diff)
OCD: foreach -> C++11 ranged for
Diffstat (limited to 'src/nix-daemon')
-rw-r--r--src/nix-daemon/nix-daemon.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index ad8b0d133d82..02d552a62f71 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -367,9 +367,9 @@ static void performOp(bool trusted, unsigned int clientVersion,
         Roots roots = store->findRoots();
         stopWork();
         writeInt(roots.size(), to);
-        for (Roots::iterator i = roots.begin(); i != roots.end(); ++i) {
-            writeString(i->first, to);
-            writeString(i->second, to);
+        for (auto & i : roots) {
+            writeString(i.first, to);
+            writeString(i.second, to);
         }
         break;
     }
@@ -464,12 +464,12 @@ static void performOp(bool trusted, unsigned int clientVersion,
         store->querySubstitutablePathInfos(paths, infos);
         stopWork();
         writeInt(infos.size(), to);
-        foreach (SubstitutablePathInfos::iterator, i, infos) {
-            writeString(i->first, to);
-            writeString(i->second.deriver, to);
-            writeStrings(i->second.references, to);
-            writeLongLong(i->second.downloadSize, to);
-            writeLongLong(i->second.narSize, to);
+        for (auto & i : infos) {
+            writeString(i.first, to);
+            writeString(i.second.deriver, to);
+            writeStrings(i.second.references, to);
+            writeLongLong(i.second.downloadSize, to);
+            writeLongLong(i.second.narSize, to);
         }
         break;
     }