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

Unified Diff: tools/gn/ninja_action_target_writer.cc

Issue 610043002: Convert GN's deps iterator to work with range-based for loops. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: tools/gn/ninja_action_target_writer.cc
diff --git a/tools/gn/ninja_action_target_writer.cc b/tools/gn/ninja_action_target_writer.cc
index fe62f6305c0c08610de0b32b63107f9a456b7c7f..ccbb5709b8fb139ac77e1ae5bc80aea490451cef 100644
--- a/tools/gn/ninja_action_target_writer.cc
+++ b/tools/gn/ninja_action_target_writer.cc
@@ -32,9 +32,8 @@ void NinjaActionTargetWriter::Run() {
// operating on the result of that previous step, so we need to be sure to
// serialize these.
std::vector<const Target*> extra_hard_deps;
- for (DepsIterator iter(target_, DepsIterator::LINKED_ONLY);
- !iter.done(); iter.Advance())
- extra_hard_deps.push_back(iter.target());
+ for (const auto& pair : target_->GetDeps(Target::DEPS_LINKED))
+ extra_hard_deps.push_back(pair.ptr);
// For ACTIONs this is a bit inefficient since it creates an input dep
// stamp file even though we're only going to use it once. It would save a

Powered by Google App Engine
This is Rietveld 408576698