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

Unified Diff: tools/gn/binary_target_generator.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
« no previous file with comments | « no previous file | tools/gn/builder.cc » ('j') | tools/gn/command_refs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/binary_target_generator.cc
diff --git a/tools/gn/binary_target_generator.cc b/tools/gn/binary_target_generator.cc
index 73f7cd26716519ab237b1a1491b9b9d15c124764..d73c76e3dab4da10c586a1a67b14349204cd3d1b 100644
--- a/tools/gn/binary_target_generator.cc
+++ b/tools/gn/binary_target_generator.cc
@@ -120,9 +120,8 @@ bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
// Validate that all circular includes entries are in the deps.
for (size_t circular_i = 0; circular_i < circular.size(); circular_i++) {
bool found_dep = false;
- for (DepsIterator iter(target_, DepsIterator::LINKED_ONLY);
- !iter.done(); iter.Advance()) {
- if (iter.label() == circular[circular_i]) {
+ for (const auto& dep_pair : target_->GetDeps(Target::DEPS_LINKED)) {
+ if (dep_pair.label == circular[circular_i]) {
found_dep = true;
break;
}
« no previous file with comments | « no previous file | tools/gn/builder.cc » ('j') | tools/gn/command_refs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698