Remove an unnecessary variable
This commit is contained in:
parent
65f7fc610e
commit
57e7fff6f6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user