mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Default move construct/assign of rhi::Handle
This commit is contained in:
parent
7a4b17c230
commit
7910d12809
1 changed files with 4 additions and 13 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue