mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 20:51:00 +01:00
OCD: foreach -> C++11 ranged for
This commit is contained in:
parent
1511aa9f48
commit
6bd2c7bb38
30 changed files with 849 additions and 874 deletions
|
|
@ -64,8 +64,8 @@ static void query(std::pair<FdSink, FdSource> & pipes)
|
|||
writeStrings(tokenized, pipes.first);
|
||||
pipes.first.flush();
|
||||
PathSet paths = readStrings<PathSet>(pipes.second);
|
||||
foreach (PathSet::iterator, i, paths)
|
||||
std::cout << *i << std::endl;
|
||||
for (auto & i : paths)
|
||||
std::cout << i << std::endl;
|
||||
} else if (cmd == "info") {
|
||||
writeInt(cmdQueryPathInfos, pipes.first);
|
||||
writeStrings(tokenized, pipes.first);
|
||||
|
|
@ -80,8 +80,8 @@ static void query(std::pair<FdSink, FdSource> & pipes)
|
|||
std::cout << deriver << std::endl;
|
||||
PathSet references = readStorePaths<PathSet>(pipes.second);
|
||||
std::cout << references.size() << std::endl;
|
||||
foreach (PathSet::iterator, i, references)
|
||||
std::cout << *i << std::endl;
|
||||
for (auto & i : references)
|
||||
std::cout << i << std::endl;
|
||||
std::cout << readLongLong(pipes.second) << std::endl;
|
||||
std::cout << readLongLong(pipes.second) << std::endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue