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(NullHandleType) noexcept : Handle() {}
|
||||||
|
|
||||||
Handle(const Handle&) = default;
|
Handle(const Handle&) noexcept = default;
|
||||||
Handle(Handle&& rhs) noexcept
|
Handle(Handle&&) noexcept = default;
|
||||||
{
|
|
||||||
id_ = std::exchange(rhs.id_, 0);
|
|
||||||
generation_ = std::exchange(rhs.generation_, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
Handle& operator=(const Handle&) = default;
|
Handle& operator=(const Handle&) noexcept = default;
|
||||||
Handle& operator=(Handle&& rhs) noexcept
|
Handle& operator=(Handle&&) noexcept = default;
|
||||||
{
|
|
||||||
id_ = std::exchange(rhs.id_, 0);
|
|
||||||
generation_ = std::exchange(rhs.generation_, 0);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Conversions from Handles of derived type U to base type T
|
// Conversions from Handles of derived type U to base type T
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue