| Index: tools/gn/binary_target_generator.cc
|
| diff --git a/tools/gn/binary_target_generator.cc b/tools/gn/binary_target_generator.cc
|
| index d73c76e3dab4da10c586a1a67b14349204cd3d1b..deee2161b58bfe89fa8652cce05c7a5b06305c06 100644
|
| --- a/tools/gn/binary_target_generator.cc
|
| +++ b/tools/gn/binary_target_generator.cc
|
| @@ -118,17 +118,17 @@ bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
|
| return false;
|
|
|
| // Validate that all circular includes entries are in the deps.
|
| - for (size_t circular_i = 0; circular_i < circular.size(); circular_i++) {
|
| + for (const auto& cur : circular) {
|
| bool found_dep = false;
|
| for (const auto& dep_pair : target_->GetDeps(Target::DEPS_LINKED)) {
|
| - if (dep_pair.label == circular[circular_i]) {
|
| + if (dep_pair.label == cur) {
|
| found_dep = true;
|
| break;
|
| }
|
| }
|
| if (!found_dep) {
|
| *err_ = Err(*value, "Label not in deps.",
|
| - "The label \"" + circular[circular_i].GetUserVisibleName(false) +
|
| + "The label \"" + cur.GetUserVisibleName(false) +
|
| "\"\nwas not in the deps of this target. "
|
| "allow_circular_includes_from only allows\ntargets present in the "
|
| "deps.");
|
| @@ -137,7 +137,7 @@ bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
|
| }
|
|
|
| // Add to the set.
|
| - for (size_t i = 0; i < circular.size(); i++)
|
| - target_->allow_circular_includes_from().insert(circular[i]);
|
| + for (const auto& cur : circular)
|
| + target_->allow_circular_includes_from().insert(cur);
|
| return true;
|
| }
|
|
|