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

Unified Diff: tools/gn/operators.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/operators.cc
diff --git a/tools/gn/operators.cc b/tools/gn/operators.cc
index 17e31a728ab398556f09f89e9b82eee883fc9d13..b78e9350df2a9b1db36441df5e39b1e7cafcbb09 100644
--- a/tools/gn/operators.cc
+++ b/tools/gn/operators.cc
@@ -98,10 +98,10 @@ void RemoveMatchesFromList(const BinaryOpNode* op_node,
}
case Value::LIST: // Filter out each individual thing.
- for (size_t i = 0; i < to_remove.list_value().size(); i++) {
+ for (const auto& elem : to_remove.list_value()) {
// TODO(brettw) if the nested item is a list, we may want to search
// for the literal list rather than remote the items in it.
- RemoveMatchesFromList(op_node, list, to_remove.list_value()[i], err);
+ RemoveMatchesFromList(op_node, list, elem, err);
if (err->has_error())
return;
}

Powered by Google App Engine
This is Rietveld 408576698