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

Unified Diff: tools/gn/function_process_file_template.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_get_target_outputs.cc ('k') | tools/gn/function_rebase_path.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_process_file_template.cc
diff --git a/tools/gn/function_process_file_template.cc b/tools/gn/function_process_file_template.cc
index 540d1edf55fd939d0c5f8c729776ae0585925a06..b7828a6b8aa724c21433923d78f44a5e08b283f3 100644
--- a/tools/gn/function_process_file_template.cc
+++ b/tools/gn/function_process_file_template.cc
@@ -98,8 +98,8 @@ Value RunProcessFileTemplate(Scope* scope,
// Convert the list of strings to the return Value.
Value ret(function, Value::LIST);
ret.list_value().reserve(result_files.size());
- for (size_t i = 0; i < result_files.size(); i++)
- ret.list_value().push_back(Value(function, result_files[i]));
+ for (const auto& file : result_files)
+ ret.list_value().push_back(Value(function, file));
return ret;
}
« no previous file with comments | « tools/gn/function_get_target_outputs.cc ('k') | tools/gn/function_rebase_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698