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

Unified Diff: tools/gn/err.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: review 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
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/escape.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(' ');
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698