| Index: tools/gn/function_get_target_outputs.cc
|
| diff --git a/tools/gn/function_get_target_outputs.cc b/tools/gn/function_get_target_outputs.cc
|
| index e3a63eeca6b6b45dadc1366fa9d350988169d2cc..163b187d82049940c772f5b7db868d91c656ca42 100644
|
| --- a/tools/gn/function_get_target_outputs.cc
|
| +++ b/tools/gn/function_get_target_outputs.cc
|
| @@ -92,8 +92,8 @@ Value RunGetTargetOutputs(Scope* scope,
|
| *err = Err(function, "No targets defined in this context.");
|
| return Value();
|
| }
|
| - for (size_t i = 0; i < collector->size(); i++) {
|
| - const Item* item = (*collector)[i]->get();
|
| + for (const auto& cur : *collector) {
|
| + const Item* item = cur->get();
|
| if (item->label() != label)
|
| continue;
|
|
|
| @@ -132,8 +132,8 @@ Value RunGetTargetOutputs(Scope* scope,
|
| // Convert to Values.
|
| Value ret(function, Value::LIST);
|
| ret.list_value().reserve(files.size());
|
| - for (size_t i = 0; i < files.size(); i++)
|
| - ret.list_value().push_back(Value(function, files[i].value()));
|
| + for (const auto& file : files)
|
| + ret.list_value().push_back(Value(function, file.value()));
|
|
|
| return ret;
|
| }
|
|
|