From 7910d128097feb161b3bb667c4d87bab6ef79eab Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 14 May 2025 19:13:54 -0500 Subject: [PATCH] Default move construct/assign of rhi::Handle --- src/rhi/handle.hpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/rhi/handle.hpp b/src/rhi/handle.hpp index deed29498..8101d9482 100644 --- a/src/rhi/handle.hpp +++ b/src/rhi/handle.hpp @@ -44,20 +44,11 @@ public: Handle(NullHandleType) noexcept : Handle() {} - Handle(const Handle&) = default; - Handle(Handle&& rhs) noexcept - { - id_ = std::exchange(rhs.id_, 0); - generation_ = std::exchange(rhs.generation_, 0); - }; + Handle(const Handle&) noexcept = default; + Handle(Handle&&) noexcept = default; - Handle& operator=(const Handle&) = default; - Handle& operator=(Handle&& rhs) noexcept - { - id_ = std::exchange(rhs.id_, 0); - generation_ = std::exchange(rhs.generation_, 0); - return *this; - } + Handle& operator=(const Handle&) noexcept = default; + Handle& operator=(Handle&&) noexcept = default; // Conversions from Handles of derived type U to base type T