mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-06 19:31:13 +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(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