Swap context references in the move assignment
This commit is contained in:
parent
ee2d756d94
commit
07670ed36a
@ -168,12 +168,7 @@ public:
|
||||
|
||||
ContextRef& operator=(const ContextRef&) = delete;
|
||||
ContextRef& operator=(ContextRef&& rhs) noexcept
|
||||
{
|
||||
reset();
|
||||
mCtx = rhs.mCtx;
|
||||
rhs.mCtx = nullptr;
|
||||
return *this;
|
||||
}
|
||||
{ std::swap(mCtx, rhs.mCtx); return *this; }
|
||||
|
||||
operator bool() const noexcept { return mCtx != nullptr; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user