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

Unified Diff: tools/gn/function_write_file.cc

Issue 610293003: Replace more for loops in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 3 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
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/gn_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_write_file.cc
diff --git a/tools/gn/function_write_file.cc b/tools/gn/function_write_file.cc
index 69ae59ec877ab43f4a20f2a2abe9ee5771ad924a..55f4d5dc63a0e543fe9d58dfca7cbb2968188356 100644
--- a/tools/gn/function_write_file.cc
+++ b/tools/gn/function_write_file.cc
@@ -67,8 +67,8 @@ Value RunWriteFile(Scope* scope,
std::ostringstream contents;
if (args[1].type() == Value::LIST) {
const std::vector<Value>& list = args[1].list_value();
- for (size_t i = 0; i < list.size(); i++)
- contents << list[i].ToString(false) << std::endl;
+ for (const auto& cur : list)
+ contents << cur.ToString(false) << std::endl;
} else {
contents << args[1].ToString(false);
}
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/gn_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698