Index: tools/gn/err.cc |
diff --git a/tools/gn/err.cc b/tools/gn/err.cc |
index 6a9033d1ba4f11880bf2130d198958942936d21f..319bfa8bb53b8990373495ad40f2d9e1163cb539 100644 |
--- a/tools/gn/err.cc |
+++ b/tools/gn/err.cc |
@@ -64,8 +64,8 @@ void OutputHighlighedPosition(const Location& location, |
highlight[i] = ' '; |
// Highlight all the ranges on the line. |
- for (size_t i = 0; i < ranges.size(); i++) |
- FillRangeOnLine(ranges[i], location.line_number(), &highlight); |
+ for (const auto& range : ranges) |
+ FillRangeOnLine(range, location.line_number(), &highlight); |
// Allow the marker to be one past the end of the line for marking the end. |
highlight.push_back(' '); |