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

Unified Diff: tools/gn/standard_out.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/setup.cc ('k') | tools/gn/substitution_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/standard_out.cc
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc
index ba9a23a99b9bccbd0f0c990961c56d6fe5bc4c37..98e0680893705851ef06c209df1a926f8f9c890e 100644
--- a/tools/gn/standard_out.cc
+++ b/tools/gn/standard_out.cc
@@ -167,9 +167,7 @@ void PrintLongHelp(const std::string& text) {
std::vector<std::string> lines;
base::SplitStringDontTrim(text, '\n', &lines);
- for (size_t i = 0; i < lines.size(); i++) {
- const std::string& line = lines[i];
-
+ for (const auto& line : lines) {
// Check for a heading line.
if (!line.empty() && line[0] != ' ') {
// Highlight up to the colon (if any).
« no previous file with comments | « tools/gn/setup.cc ('k') | tools/gn/substitution_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698