diff options
-rw-r--r-- | Alc/alcontext.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Alc/alcontext.h b/Alc/alcontext.h index 426d06e8..274888e0 100644 --- a/Alc/alcontext.h +++ b/Alc/alcontext.h @@ -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; } |