Add move assignment operators to tint::ast::Module and tint::Context
This enables usage with DAWN_TRY_ASSIGN in Dawn in simplify error handling. Bug: tint:306 Change-Id: I91a96b6670341943c26d9972058ecc3ad8162db0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34640 Commit-Queue: dan sinclair <dsinclair@chromium.org> Auto-Submit: Austin Eng <enga@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
31f55c6517
commit
bf5e6b98cc
|
@ -25,6 +25,7 @@ namespace ast {
|
|||
Module::Module() = default;
|
||||
|
||||
Module::Module(Module&&) = default;
|
||||
Module& Module::operator=(Module&& rhs) = default;
|
||||
|
||||
Module::~Module() = default;
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ class Module {
|
|||
Module();
|
||||
/// Move constructor
|
||||
Module(Module&&);
|
||||
// Move assignment
|
||||
Module& operator=(Module&& rhs);
|
||||
~Module();
|
||||
|
||||
/// @return a deep copy of this module
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace ast {
|
|||
|
||||
TypeManager::TypeManager() = default;
|
||||
TypeManager::TypeManager(TypeManager&&) = default;
|
||||
TypeManager& TypeManager::operator=(TypeManager&& rhs) = default;
|
||||
TypeManager::~TypeManager() = default;
|
||||
|
||||
void TypeManager::Reset() {
|
||||
|
|
|
@ -31,6 +31,8 @@ class TypeManager {
|
|||
TypeManager();
|
||||
/// Move constructor
|
||||
TypeManager(TypeManager&&);
|
||||
// Move assignment
|
||||
TypeManager& operator=(TypeManager&& rhs);
|
||||
~TypeManager();
|
||||
|
||||
/// Clears all registered types.
|
||||
|
|
Loading…
Reference in New Issue