aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-01 14:29:02 -0700
committerChris Robinson <[email protected]>2019-08-01 14:29:02 -0700
commit57e7fff6f67f302d0202b2229a960c02c3cb3c5d (patch)
tree7a066a020011d2dfea765448246c18f1ec023286 /alc/alc.cpp
parent65f7fc610e6a6101509906c0c9bbbd794c9a3737 (diff)
Remove an unnecessary variable
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 73723f26..462d4bd0 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -838,16 +838,14 @@ void ReleaseThreadCtx(ALCcontext *context)
result ? "" : ", leak detected");
}
-std::atomic<void(*)(ALCcontext*)> ThreadCtxProc{ReleaseThreadCtx};
class ThreadCtx {
ALCcontext *ctx{nullptr};
public:
~ThreadCtx()
{
- auto destruct = ThreadCtxProc.load();
- if(destruct && ctx)
- destruct(ctx);
+ if(ctx)
+ ReleaseThreadCtx(ctx);
ctx = nullptr;
}