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

Unified Diff: tools/gn/input_conversion.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/header_checker.cc ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/input_conversion.cc
diff --git a/tools/gn/input_conversion.cc b/tools/gn/input_conversion.cc
index 2534f4d8410f21adf8ac669159ff911853d1a544..6369d2dbfa1e7accb8f43a1d8ae0d8f4b13eb0c0 100644
--- a/tools/gn/input_conversion.cc
+++ b/tools/gn/input_conversion.cc
@@ -105,8 +105,8 @@ Value ParseList(const std::string& input, const ParseNode* origin, Err* err) {
as_lines.resize(as_lines.size() - 1);
ret.list_value().reserve(as_lines.size());
- for (size_t i = 0; i < as_lines.size(); i++)
- ret.list_value().push_back(Value(origin, as_lines[i]));
+ for (const auto& line : as_lines)
+ ret.list_value().push_back(Value(origin, line));
return ret;
}
« no previous file with comments | « tools/gn/header_checker.cc ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698