diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-17 19:24:28 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-17 20:13:56 +0200 |
commit | 6bd2c7bb386de16310fa5534275e6e638be60862 (patch) | |
tree | 0a12144dfb4e8d1b069bc09d583b522b5c158b28 /src/nix-daemon | |
parent | 1511aa9f488ba0762c2da0bf8ab61b5fde47305d (diff) |
OCD: foreach -> C++11 ranged for
Diffstat (limited to 'src/nix-daemon')
-rw-r--r-- | src/nix-daemon/nix-daemon.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc index ad8b0d133..02d552a62 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; } |