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

Unified Diff: tools/gn/function_rebase_path.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_process_file_template.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_rebase_path.cc
diff --git a/tools/gn/function_rebase_path.cc b/tools/gn/function_rebase_path.cc
index dd5e903ec8673016e01c5cf5a5b0d96c81b39095..078f007b4509798cf12aa736c803d771fab24d77 100644
--- a/tools/gn/function_rebase_path.cc
+++ b/tools/gn/function_rebase_path.cc
@@ -260,9 +260,9 @@ Value RunRebasePath(Scope* scope,
result = Value(function, Value::LIST);
result.list_value().reserve(inputs.list_value().size());
- for (size_t i = 0; i < inputs.list_value().size(); i++) {
+ for (const auto& input : inputs.list_value()) {
result.list_value().push_back(
- ConvertOnePath(scope, function, inputs.list_value()[i],
+ ConvertOnePath(scope, function, input,
from_dir, to_dir, convert_to_system_absolute, err));
if (err->has_error()) {
result = Value();
« no previous file with comments | « tools/gn/function_process_file_template.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698