From be476c793574fcde7bb78df1595257cc52f4c93a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 24 Apr 2020 07:04:32 -0700 Subject: Use global placement new for AsyncEvent --- alc/voice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc/voice.cpp') diff --git a/alc/voice.cpp b/alc/voice.cpp index 5dce9541..77f176b7 100644 --- a/alc/voice.cpp +++ b/alc/voice.cpp @@ -301,7 +301,7 @@ void SendSourceStoppedEvent(ALCcontext *context, ALuint id) auto evt_vec = ring->getWriteVector(); if(evt_vec.first.len < 1) return; - AsyncEvent *evt{new (evt_vec.first.buf) AsyncEvent{EventType_SourceStateChange}}; + AsyncEvent *evt{::new(evt_vec.first.buf) AsyncEvent{EventType_SourceStateChange}}; evt->u.srcstate.id = id; evt->u.srcstate.state = AL_STOPPED; @@ -906,7 +906,7 @@ void Voice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesToD auto evt_vec = ring->getWriteVector(); if(evt_vec.first.len > 0) { - AsyncEvent *evt{new (evt_vec.first.buf) AsyncEvent{EventType_BufferCompleted}}; + AsyncEvent *evt{::new(evt_vec.first.buf) AsyncEvent{EventType_BufferCompleted}}; evt->u.bufcomp.id = SourceID; evt->u.bufcomp.count = buffers_done; ring->writeAdvance(1); -- cgit v1.2.3