aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-09-11 19:34:55 -0700
committerChris Robinson <[email protected]>2023-09-11 19:34:55 -0700
commit6722ad196145ef7334d7478bdd375308801e7096 (patch)
tree60ca9a830e7601e8eb4289696b565d852cbb9760 /alc/context.cpp
parent43fac7e95568a2b7205db365a49e3938b05e913b (diff)
Make some global and static member variables inline
This also seems to work around the problematic MinGW code generation, so the indirection to access it can be removed.
Diffstat (limited to 'alc/context.cpp')
-rw-r--r--alc/context.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index bba74a59..3b1de7b9 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -102,7 +102,6 @@ std::vector<std::string_view> getContextExtensions() noexcept
std::atomic<bool> ALCcontext::sGlobalContextLock{false};
std::atomic<ALCcontext*> ALCcontext::sGlobalContext{nullptr};
-thread_local ALCcontext *ALCcontext::sLocalContext{nullptr};
ALCcontext::ThreadCtx::~ThreadCtx()
{
if(ALCcontext *ctx{std::exchange(ALCcontext::sLocalContext, nullptr)})
@@ -117,13 +116,6 @@ thread_local ALCcontext::ThreadCtx ALCcontext::sThreadContext;
ALeffect ALCcontext::sDefaultEffect;
-#ifdef __MINGW32__
-ALCcontext *ALCcontext::getThreadContext() noexcept
-{ return sLocalContext; }
-void ALCcontext::setThreadContext(ALCcontext *context) noexcept
-{ sThreadContext.set(context); }
-#endif
-
ALCcontext::ALCcontext(al::intrusive_ptr<ALCdevice> device, ContextFlagBitset flags)
: ContextBase{device.get()}, mALDevice{std::move(device)}, mContextFlags{flags}
{