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

Unified Diff: tools/gn/loader_unittest.cc

Issue 610293003: Replace more for loops in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 3 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/loader.cc ('k') | tools/gn/ninja_action_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/loader_unittest.cc
diff --git a/tools/gn/loader_unittest.cc b/tools/gn/loader_unittest.cc
index e5a3d86009bedead648ac39cc1a42e993c835939..fc4fa5699c2c191fad849dd6e3bae70b3c42c26a 100644
--- a/tools/gn/loader_unittest.cc
+++ b/tools/gn/loader_unittest.cc
@@ -100,13 +100,12 @@ bool MockInputFileManager::HasTwoPending(const SourceFile& f1,
void MockInputFileManager::IssueAllPending() {
BlockNode block(false); // Default response.
- for (size_t i = 0; i < pending_.size(); i++) {
- CannedResponseMap::const_iterator found =
- canned_responses_.find(pending_[i].first);
+ for (const auto& cur : pending_) {
+ CannedResponseMap::const_iterator found = canned_responses_.find(cur.first);
if (found == canned_responses_.end())
- pending_[i].second.Run(&block);
+ cur.second.Run(&block);
else
- pending_[i].second.Run(found->second->root.get());
+ cur.second.Run(found->second->root.get());
}
pending_.clear();
}
« no previous file with comments | « tools/gn/loader.cc ('k') | tools/gn/ninja_action_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698