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

Unified Diff: tools/gn/parser.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/parse_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parser.cc
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc
index 33abfd0b2f0e7378c5b11cb8dde83ac60d5684a5..977ddad6e7b27d592bc1c09a574a8ebf9fdaa42f 100644
--- a/tools/gn/parser.cc
+++ b/tools/gn/parser.cc
@@ -671,7 +671,7 @@ void Parser::TraverseOrder(const ParseNode* root,
TraverseOrder(binop->right(), pre, post);
} else if (const BlockNode* block = root->AsBlock()) {
for (const auto& statement : block->statements())
- TraverseOrder(statement, pre, post);
+ TraverseOrder(statement.get(), pre, post);
TraverseOrder(block->End(), pre, post);
} else if (const ConditionNode* condition = root->AsConditionNode()) {
TraverseOrder(condition->condition(), pre, post);
@@ -684,7 +684,7 @@ void Parser::TraverseOrder(const ParseNode* root,
// Nothing.
} else if (const ListNode* list = root->AsList()) {
for (const auto& node : list->contents())
- TraverseOrder(node, pre, post);
+ TraverseOrder(node.get(), pre, post);
TraverseOrder(list->End(), pre, post);
} else if (root->AsLiteral()) {
// Nothing.
« no previous file with comments | « tools/gn/parse_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698