Swap context references in the move assignment

This commit is contained in:
Chris Robinson 2018-11-27 10:08:25 -08:00
parent ee2d756d94
commit 07670ed36a

View File

@ -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; }