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

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: generate_test_gn_data 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
Index: tools/gn/err.cc
diff --git a/tools/gn/err.cc b/tools/gn/err.cc
index 6a9033d1ba4f11880bf2130d198958942936d21f..fb203c67bc6cd74fb499f430f869329561948c35 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 (auto& range : ranges)
scottmg 2015/03/16 16:20:51 const?
tfarina 2015/03/22 19:59:53 Done.
+ 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') | tools/gn/ninja_build_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698