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

Unified Diff: tools/gn/function_forward_variables_from.cc

Issue 1884503003: GN: Replace vector<ParseNode*> with vector<unique_ptr<ParseNode>> in parse_tree.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove comments Created 4 years, 8 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 | « tools/gn/function_foreach.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_forward_variables_from.cc
diff --git a/tools/gn/function_forward_variables_from.cc b/tools/gn/function_forward_variables_from.cc
index ee14128771588ab114695a0c86b6ea4713c7ae1b..dd3629b8f2395e52c0f7677f45e5d9e5f91f0173 100644
--- a/tools/gn/function_forward_variables_from.cc
+++ b/tools/gn/function_forward_variables_from.cc
@@ -153,7 +153,7 @@ Value RunForwardVariablesFrom(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 && args_vector.size() != 3) {
*err = Err(function, "Wrong number of arguments.",
"Expecting two or three arguments.");
@@ -166,7 +166,7 @@ Value RunForwardVariablesFrom(Scope* scope,
// to execute the ParseNode and get the value out if it's not an identifer.
const IdentifierNode* identifier = args_vector[0]->AsIdentifier();
if (!identifier) {
- *err = Err(args_vector[0], "Expected an identifier for the scope.");
+ *err = Err(args_vector[0].get(), "Expected an identifier for the scope.");
return Value();
}
« no previous file with comments | « tools/gn/function_foreach.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698