diff options
author | Chris Robinson <[email protected]> | 2018-11-18 06:46:50 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 06:46:50 -0800 |
commit | 5bbddff2f33dfc1a25b150202f8c49c4661e8115 (patch) | |
tree | c3b01f1639d84bff0546e8b63adc58f7b87e9b4c | |
parent | e194d896de6cbeec2a06041dc73ba1a0ff0d992e (diff) |
Separate class and variable definitions
-rw-r--r-- | Alc/alc.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 8cc8fb2d..15f191ff 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -797,7 +797,7 @@ std::atomic<ALCenum> LastNullDeviceError{ALC_NO_ERROR}; /* Thread-local current context */ std::atomic<void(*)(ALCcontext*)> ThreadCtxProc{nullptr}; -thread_local class ThreadCtx { +class ThreadCtx { ALCcontext *ctx{nullptr}; public: @@ -811,7 +811,8 @@ public: ALCcontext *get() const noexcept { return ctx; } void set(ALCcontext *ctx_) noexcept { ctx = ctx_; } -} LocalContext; +}; +thread_local ThreadCtx LocalContext; /* Process-wide current context */ std::atomic<ALCcontext*> GlobalContext{nullptr}; |