aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/event.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-05 17:25:08 -0700
committerChris Robinson <[email protected]>2019-06-05 17:25:08 -0700
commit5f26205f8fb504c5f6fec3e2b02f0009a4f24be2 (patch)
tree606172569e4f406a11cbef0bd9bc3fc8d59c6d06 /OpenAL32/event.cpp
parentf27e73989c9831cde96880edafb01e662a7de2db (diff)
Properly destroy other objects
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 f01227e9..2ee296b0 100644
--- a/OpenAL32/event.cpp
+++ b/OpenAL32/event.cpp
@@ -42,7 +42,7 @@ static int EventThread(ALCcontext *context)
RingBuffer *ring_;
~EventAutoDestructor()
{
- evt_.~AsyncEvent();
+ al::destroy_at(&evt_);
ring_->readAdvance(1);
}
} _{evt, ring};
@@ -99,7 +99,7 @@ static int EventThread(ALCcontext *context)
void StartEventThrd(ALCcontext *ctx)
{
try {
- ctx->EventThread = std::thread(EventThread, ctx);
+ ctx->EventThread = std::thread{EventThread, ctx};
}
catch(std::exception& e) {
ERR("Failed to start event thread: %s\n", e.what());