| Index: tools/gn/function_foreach.cc
|
| diff --git a/tools/gn/function_foreach.cc b/tools/gn/function_foreach.cc
|
| index 549ebe407c1ec93287922ab29ecb5ab9c22baa54..b74fc186af115c95ad951c7bd2c5389ba6ce4697 100644
|
| --- a/tools/gn/function_foreach.cc
|
| +++ b/tools/gn/function_foreach.cc
|
| @@ -47,7 +47,7 @@ Value RunForEach(Scope* scope,
|
| const FunctionCallNode* function,
|
| const ListNode* args_list,
|
| Err* err) {
|
| - const std::vector<const ParseNode*>& args_vector = args_list->contents();
|
| + const auto& args_vector = args_list->contents();
|
| if (args_vector.size() != 2) {
|
| *err = Err(function, "Wrong number of arguments to foreach().",
|
| "Expecting exactly two.");
|
| @@ -57,7 +57,8 @@ Value RunForEach(Scope* scope,
|
| // Extract the loop variable.
|
| const IdentifierNode* identifier = args_vector[0]->AsIdentifier();
|
| if (!identifier) {
|
| - *err = Err(args_vector[0], "Expected an identifier for the loop var.");
|
| + *err =
|
| + Err(args_vector[0].get(), "Expected an identifier for the loop var.");
|
| return Value();
|
| }
|
| base::StringPiece loop_var(identifier->value().value());
|
| @@ -69,7 +70,7 @@ Value RunForEach(Scope* scope,
|
| if (list_identifier) {
|
| list_value = scope->GetValue(list_identifier->value().value(), true);
|
| if (!list_value) {
|
| - *err = Err(args_vector[1], "Undefined identifier.");
|
| + *err = Err(args_vector[1].get(), "Undefined identifier.");
|
| return Value();
|
| }
|
| } else {
|
|
|