mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 13:01:56 +00:00
Merge branch 'default-move-construct' into 'master'
Default move construct/assign of rhi::Handle See merge request kart-krew-dev/ring-racers-internal!2541
This commit is contained in:
commit
088950f793
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