Replace use of std::unique_ptr<T> with T* for AST nodes
This is a minimal effort to fix up the code. There's substantial code
cleanup which can now be done, which is done in the next change.
Bug: tint:322
Change-Id: Iafcf5e814837d9534889e8c21333de4931a19cfa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32864
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/src/ast/scalar_constructor_expression.cc b/src/ast/scalar_constructor_expression.cc
index 52b3ed2..f82983d 100644
--- a/src/ast/scalar_constructor_expression.cc
+++ b/src/ast/scalar_constructor_expression.cc
@@ -20,14 +20,12 @@
ScalarConstructorExpression::ScalarConstructorExpression()
: ConstructorExpression() {}
-ScalarConstructorExpression::ScalarConstructorExpression(
- std::unique_ptr<Literal> literal)
- : ConstructorExpression(), literal_(std::move(literal)) {}
+ScalarConstructorExpression::ScalarConstructorExpression(Literal* literal)
+ : literal_(literal) {}
-ScalarConstructorExpression::ScalarConstructorExpression(
- const Source& source,
- std::unique_ptr<Literal> litearl)
- : ConstructorExpression(source), literal_(std::move(litearl)) {}
+ScalarConstructorExpression::ScalarConstructorExpression(const Source& source,
+ Literal* litearl)
+ : ConstructorExpression(source), literal_(litearl) {}
ScalarConstructorExpression::ScalarConstructorExpression(
ScalarConstructorExpression&&) = default;