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

Unified Diff: tools/gn/command_clean.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: const 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 | « no previous file | tools/gn/command_desc.cc » ('j') | tools/gn/escape.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_clean.cc
diff --git a/tools/gn/command_clean.cc b/tools/gn/command_clean.cc
index 8872478f120f3d89637dff639d0fb3775fbf67f8..cef3526288ec03cd1df87b076bac67bf30da9a16 100644
--- a/tools/gn/command_clean.cc
+++ b/tools/gn/command_clean.cc
@@ -30,10 +30,10 @@ std::string ExtractGNBuildCommands(const base::FilePath& build_ninja_file) {
std::string result;
int num_blank_lines = 0;
- for (size_t i = 0; i < lines.size(); ++i) {
- result += lines[i];
+ for (const auto& line : lines) {
+ result += line;
result += "\n";
- if (lines[i].empty()) {
+ if (line.empty()) {
++num_blank_lines;
}
if (num_blank_lines == 2)
« no previous file with comments | « no previous file | tools/gn/command_desc.cc » ('j') | tools/gn/escape.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698