diff options
author | Chris Robinson <[email protected]> | 2018-12-27 10:44:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-27 10:44:02 -0800 |
commit | 4dca2f2ee5ef488fbe05397de1ab3029e559cf61 (patch) | |
tree | 930224ac816f69b0ca0a7cd0c97e647d6e04da57 /OpenAL32/event.cpp | |
parent | be85ab6f826a724105cef05e740b5013a1e6149e (diff) |
Use a unique_ptr for the AsyncEvents ringbuffer
Diffstat (limited to 'OpenAL32/event.cpp')
-rw-r--r-- | OpenAL32/event.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp index f14c3229..f3474139 100644 --- a/OpenAL32/event.cpp +++ b/OpenAL32/event.cpp @@ -17,7 +17,7 @@ static int EventThread(ALCcontext *context) { - RingBuffer *ring{context->AsyncEvents}; + RingBuffer *ring{context->AsyncEvents.get()}; bool quitnow{false}; while(LIKELY(!quitnow)) { @@ -44,7 +44,7 @@ static int EventThread(ALCcontext *context) evt.~AsyncEvent(); ring->readAdvance(1); } - } _{evt, context->AsyncEvents}; + } _{evt, context->AsyncEvents.get()}; quitnow = evt.EnumType == EventType_KillThread; if(UNLIKELY(quitnow)) break; @@ -111,7 +111,7 @@ void StartEventThrd(ALCcontext *ctx) void StopEventThrd(ALCcontext *ctx) { static constexpr AsyncEvent kill_evt{EventType_KillThread}; - RingBuffer *ring{ctx->AsyncEvents}; + RingBuffer *ring{ctx->AsyncEvents.get()}; auto evt_data = ring->getWriteVector().first; if(evt_data.len == 0) { |