diff options
author | Chris Robinson <[email protected]> | 2019-08-01 14:29:02 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-01 14:29:02 -0700 |
commit | 57e7fff6f67f302d0202b2229a960c02c3cb3c5d (patch) | |
tree | 7a066a020011d2dfea765448246c18f1ec023286 /alc | |
parent | 65f7fc610e6a6101509906c0c9bbbd794c9a3737 (diff) |
Remove an unnecessary variable
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alc.cpp | 6 |
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; } |