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

Unified Diff: tools/gn/toolchain.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: more 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
« tools/gn/pattern.cc ('K') | « tools/gn/substitution_pattern.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/toolchain.cc
diff --git a/tools/gn/toolchain.cc b/tools/gn/toolchain.cc
index 341a48cf185c50ff9eaf1ba70ebeaf0cb9f5bd78..dbc1173b466eb8bec11034966d101b0779f59489 100644
--- a/tools/gn/toolchain.cc
+++ b/tools/gn/toolchain.cc
@@ -89,9 +89,9 @@ void Toolchain::SetTool(ToolType type, scoped_ptr<Tool> t) {
void Toolchain::ToolchainSetupComplete() {
// Collect required bits from all tools.
- for (size_t i = 0; i < TYPE_NUMTYPES; i++) {
- if (tools_[i])
- substitution_bits_.MergeFrom(tools_[i]->substitution_bits());
+ for (const auto& tool : tools_) {
+ if (tool)
+ substitution_bits_.MergeFrom(tool->substitution_bits());
}
setup_complete_ = true;
« tools/gn/pattern.cc ('K') | « tools/gn/substitution_pattern.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698