From 0f24139b57460c71d66b9a090217d34706d64dde Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 6 Dec 2018 22:24:20 -0800 Subject: Use a constructor instead of a macro to initialize AsyncEvent --- OpenAL32/event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32/event.cpp') diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp index 1a4e1df0..ad3fd4ab 100644 --- a/OpenAL32/event.cpp +++ b/OpenAL32/event.cpp @@ -18,9 +18,9 @@ static int EventThread(ALCcontext *context) { bool quitnow{false}; + AsyncEvent evt{}; while(LIKELY(!quitnow)) { - AsyncEvent evt; if(ll_ringbuffer_read(context->AsyncEvents, &evt, 1) == 0) { context->EventSem.wait(); @@ -90,7 +90,7 @@ void StartEventThrd(ALCcontext *ctx) void StopEventThrd(ALCcontext *ctx) { - static constexpr AsyncEvent kill_evt = ASYNC_EVENT(EventType_KillThread); + static constexpr AsyncEvent kill_evt{EventType_KillThread}; while(ll_ringbuffer_write(ctx->AsyncEvents, &kill_evt, 1) == 0) std::this_thread::yield(); ctx->EventSem.post(); -- cgit v1.2.3