Index: tools/gn/standard_out.cc |
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc |
index b318fe477a9cb50914c374121dfc4b5329ccda92..69d443be368a22f37b8f1ca4eee2c6fe642dbaeb 100644 |
--- a/tools/gn/standard_out.cc |
+++ b/tools/gn/standard_out.cc |
@@ -179,12 +179,12 @@ void PrintLongHelp(const std::string& text) { |
// Check for a comment. |
TextDecoration dec = DECORATION_NONE; |
- for (size_t char_i = 0; char_i < line.size(); char_i++) { |
- if (line[char_i] == '#') { |
+ for (const auto& elem : line) { |
+ if (elem == '#') { |
// Got a comment, draw dimmed. |
dec = DECORATION_DIM; |
break; |
- } else if (line[char_i] != ' ') { |
+ } else if (elem != ' ') { |
break; |
} |
} |