aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/event.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-06 22:24:20 -0800
committerChris Robinson <[email protected]>2018-12-06 22:24:20 -0800
commit0f24139b57460c71d66b9a090217d34706d64dde (patch)
tree29138a2a4d6ff0734f4c205983cc7d6711790c6e /OpenAL32/event.cpp
parent42d26472eb514a2fcb1eafbed93f56a697ebb3a0 (diff)
Use a constructor instead of a macro to initialize AsyncEvent
Diffstat (limited to 'OpenAL32/event.cpp')
-rw-r--r--OpenAL32/event.cpp4
1 files changed, 2 insertions, 2 deletions
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();