diff options
author | Chris Robinson <[email protected]> | 2018-11-24 14:07:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-24 14:07:32 -0800 |
commit | bd8db0d27b50644dad97aa74f8f207d30d6b9490 (patch) | |
tree | 70045d4bd1a56c6bbb533e3545e0795f4e8bdb43 /Alc/alc.cpp | |
parent | 62d38b1187ac3cf64f3e78531a9720279f877e23 (diff) |
Make GetContextRef return a ContextRef
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 46b371ef..40bf25b4 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2769,10 +2769,9 @@ static ContextRef VerifyContext(ALCcontext *context) /* GetContextRef * - * Returns the currently active context for this thread, and adds a reference - * without locking it. + * Returns a new reference to the currently active context for this thread. */ -ALCcontext *GetContextRef(void) +ContextRef GetContextRef(void) { ALCcontext *context{LocalContext.get()}; if(context) @@ -2783,8 +2782,7 @@ ALCcontext *GetContextRef(void) context = GlobalContext.load(std::memory_order_acquire); if(context) ALCcontext_IncRef(context); } - - return context; + return ContextRef{context}; } |