diff options
author | Chris Robinson <[email protected]> | 2018-11-21 00:40:41 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-21 00:40:41 -0800 |
commit | 8ec25da12ec41b1277c9f68390bd5ab29bbcbc52 (patch) | |
tree | bba6046b3f80c6e0f19615efe484b21e04f4ac15 /Alc | |
parent | ed06169569193a081b97b7b37cd1a1d3579f5636 (diff) |
Rename a method to be clearer about its behavior
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alcontext.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alcontext.h b/Alc/alcontext.h index 4a056597..1d66ffc6 100644 --- a/Alc/alcontext.h +++ b/Alc/alcontext.h @@ -148,7 +148,7 @@ inline void UnlockEffectSlotList(ALCcontext *context) class ContextRef { ALCcontext *mCtx{nullptr}; - void release() noexcept + void reset() noexcept { if(mCtx) ALCcontext_DecRef(mCtx); @@ -158,12 +158,12 @@ class ContextRef { public: ContextRef() noexcept = default; explicit ContextRef(ALCcontext *ctx) noexcept : mCtx(ctx) { } - ~ContextRef() { release(); } + ~ContextRef() { reset(); } ContextRef& operator=(const ContextRef&) = delete; ContextRef& operator=(ContextRef&& rhs) noexcept { - release(); + reset(); mCtx = rhs.mCtx; rhs.mCtx = nullptr; return *this; |