From 6bd2c7bb386de16310fa5534275e6e638be60862 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Jul 2015 19:24:28 +0200 Subject: OCD: foreach -> C++11 ranged for --- src/download-via-ssh/download-via-ssh.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/download-via-ssh') diff --git a/src/download-via-ssh/download-via-ssh.cc b/src/download-via-ssh/download-via-ssh.cc index f71cf56507b8..73f8860948b0 100644 --- a/src/download-via-ssh/download-via-ssh.cc +++ b/src/download-via-ssh/download-via-ssh.cc @@ -64,8 +64,8 @@ static void query(std::pair & pipes) writeStrings(tokenized, pipes.first); pipes.first.flush(); PathSet paths = readStrings(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 & pipes) std::cout << deriver << std::endl; PathSet references = readStorePaths(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; } -- cgit 1.4.1