From 57e7fff6f67f302d0202b2229a960c02c3cb3c5d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 1 Aug 2019 14:29:02 -0700 Subject: [PATCH] Remove an unnecessary variable --- alc/alc.cpp | 6 ++---- 1 file 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 ThreadCtxProc{ReleaseThreadCtx}; class ThreadCtx { ALCcontext *ctx{nullptr}; public: ~ThreadCtx() { - auto destruct = ThreadCtxProc.load(); - if(destruct && ctx) - destruct(ctx); + if(ctx) + ReleaseThreadCtx(ctx); ctx = nullptr; }