diff options
author | Chris Robinson <[email protected]> | 2023-05-24 11:56:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-24 11:56:56 -0700 |
commit | f3e9d066df50a6e77e8c15ea97b195a4b069f254 (patch) | |
tree | 1823b869dd881b1c46243ba3e653979d210caba6 /alc | |
parent | da56dd074595d6590273eeb1739f1c9bfc1b5fee (diff) |
Be a bit more safe with type mangling
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index cf250988..c43da639 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -491,8 +491,7 @@ bool CalcEffectSlotParams(EffectSlot *slot, EffectSlot **sorted_slots, ContextBa auto evt_vec = ring->getWriteVector(); if(evt_vec.first.len > 0) LIKELY { - AsyncEffectReleaseEvent &evt = InitAsyncEvent<AsyncEffectReleaseEvent>( - reinterpret_cast<AsyncEvent*>(evt_vec.first.buf)); + auto &evt = InitAsyncEvent<AsyncEffectReleaseEvent>(evt_vec.first.buf); evt.mEffectState = oldstate; ring->writeAdvance(1); } @@ -1701,8 +1700,7 @@ void SendSourceStateEvent(ContextBase *context, uint id, VChangeState state) auto evt_vec = ring->getWriteVector(); if(evt_vec.first.len < 1) return; - AsyncSourceStateEvent &evt = InitAsyncEvent<AsyncSourceStateEvent>( - reinterpret_cast<AsyncEvent*>(evt_vec.first.buf)); + auto &evt = InitAsyncEvent<AsyncSourceStateEvent>(evt_vec.first.buf); evt.mId = id; switch(state) { |