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

Unified Diff: tools/gn/function_get_path_info.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_foreach.cc ('k') | tools/gn/function_get_target_outputs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_get_path_info.cc
diff --git a/tools/gn/function_get_path_info.cc b/tools/gn/function_get_path_info.cc
index ea6651c2f0219bed5b1cc1725a13e720eba7af68..67f934427c91a025e16d1dd0f7be620670761916 100644
--- a/tools/gn/function_get_path_info.cc
+++ b/tools/gn/function_get_path_info.cc
@@ -222,10 +222,9 @@ Value RunGetPathInfo(Scope* scope,
} else if (args[0].type() == Value::LIST) {
const std::vector<Value>& input_list = args[0].list_value();
Value result(function, Value::LIST);
- for (size_t i = 0; i < input_list.size(); i++) {
+ for (const auto& cur : input_list) {
result.list_value().push_back(Value(function,
- GetOnePathInfo(scope->settings(), current_dir, what,
- input_list[i], err)));
+ GetOnePathInfo(scope->settings(), current_dir, what, cur, err)));
if (err->has_error())
return Value();
}
« no previous file with comments | « tools/gn/function_foreach.cc ('k') | tools/gn/function_get_target_outputs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698