From 33bcced82a1e97811d4212195b6e6ca9cf2242b1 Mon Sep 17 00:00:00 2001 From: Chris Robinson <chris.kcat@gmail.com> Date: Thu, 1 Aug 2019 19:44:09 -0700 Subject: Use a smart pointer for holding the context's device --- al/event.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'al/event.cpp') diff --git a/al/event.cpp b/al/event.cpp index 75827b59..06a2e008 100644 --- a/al/event.cpp +++ b/al/event.cpp @@ -120,7 +120,6 @@ void StartEventThrd(ALCcontext *ctx) void StopEventThrd(ALCcontext *ctx) { - static constexpr AsyncEvent kill_evt{EventType_KillThread}; RingBuffer *ring{ctx->mAsyncEvents.get()}; auto evt_data = ring->getWriteVector().first; if(evt_data.len == 0) @@ -130,7 +129,7 @@ void StopEventThrd(ALCcontext *ctx) evt_data = ring->getWriteVector().first; } while(evt_data.len == 0); } - new (evt_data.buf) AsyncEvent{kill_evt}; + new (evt_data.buf) AsyncEvent{EventType_KillThread}; ring->writeAdvance(1); ctx->mEventSem.post(); -- cgit v1.2.3