Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: tools/gn/exec_process.cc

Issue 986113002: tools/gn: Convert for loops to use the new range-based loops in C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/exec_process.cc
diff --git a/tools/gn/exec_process.cc b/tools/gn/exec_process.cc
index d499921a1f307cc8f2ce2caf7ce81b59cd032523..cc4a475263de0c29f2c6c7472e2c51082efc3d2a 100644
--- a/tools/gn/exec_process.cc
+++ b/tools/gn/exec_process.cc
@@ -194,8 +194,8 @@ bool ExecProcess(const base::CommandLine& cmdline,
// Adding another element here? Remeber to increase the argument to
// reserve(), above.
- for (size_t i = 0; i < fd_shuffle1.size(); ++i)
- fd_shuffle2.push_back(fd_shuffle1[i]);
+ for (const auto& elem : fd_shuffle1)
+ fd_shuffle2.push_back(elem);
if (!ShuffleFileDescriptors(&fd_shuffle1))
_exit(127);

Powered by Google App Engine
This is Rietveld 408576698