aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcontext.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-27 10:08:25 -0800
committerChris Robinson <[email protected]>2018-11-27 10:08:25 -0800
commit07670ed36aeb32e8a7da12110bed1003c46c704e (patch)
tree2eaaf37d740da86e040d886bf5a22af66effeeda /Alc/alcontext.h
parentee2d756d940ddd798290e1539a08167d05397f7f (diff)
Swap context references in the move assignment
Diffstat (limited to 'Alc/alcontext.h')
-rw-r--r--Alc/alcontext.h7
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; }