diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/auxeffectslot.cpp | 2 | ||||
-rw-r--r-- | al/buffer.cpp | 2 | ||||
-rw-r--r-- | al/effect.cpp | 2 | ||||
-rw-r--r-- | al/event.cpp | 2 | ||||
-rw-r--r-- | al/filter.cpp | 2 | ||||
-rw-r--r-- | al/source.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index ad7ba41e..16e4cbea 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -279,7 +279,7 @@ ALeffectslot *AllocEffectSlot(ALCcontext *context) auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask)); ASSUME(slidx < 64); - ALeffectslot *slot{::new(sublist->EffectSlots + slidx) ALeffectslot{}}; + ALeffectslot *slot{al::construct_at(sublist->EffectSlots + slidx)}; aluInitEffectPanning(&slot->mSlot, context); /* Add 1 to avoid source ID 0. */ diff --git a/al/buffer.cpp b/al/buffer.cpp index 088775b8..0171b8d4 100644 --- a/al/buffer.cpp +++ b/al/buffer.cpp @@ -400,7 +400,7 @@ ALbuffer *AllocBuffer(ALCdevice *device) auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask)); ASSUME(slidx < 64); - ALbuffer *buffer{::new (sublist->Buffers + slidx) ALbuffer{}}; + ALbuffer *buffer{al::construct_at(sublist->Buffers + slidx)}; /* Add 1 to avoid buffer ID 0. */ buffer->id = ((lidx<<6) | slidx) + 1; diff --git a/al/effect.cpp b/al/effect.cpp index 1d2b9b3c..217cc1c2 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -187,7 +187,7 @@ ALeffect *AllocEffect(ALCdevice *device) auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask)); ASSUME(slidx < 64); - ALeffect *effect{::new (sublist->Effects + slidx) ALeffect{}}; + ALeffect *effect{al::construct_at(sublist->Effects + slidx)}; InitEffectParams(effect, AL_EFFECT_NULL); /* Add 1 to avoid effect ID 0. */ diff --git a/al/event.cpp b/al/event.cpp index 2c5fa539..d28ef01b 100644 --- a/al/event.cpp +++ b/al/event.cpp @@ -143,7 +143,7 @@ void StopEventThrd(ALCcontext *ctx) evt_data = ring->getWriteVector().first; } while(evt_data.len == 0); } - ::new(evt_data.buf) AsyncEvent{EventType_KillThread}; + al::construct_at(reinterpret_cast<AsyncEvent*>(evt_data.buf), EventType_KillThread); ring->writeAdvance(1); ctx->mEventSem.post(); diff --git a/al/filter.cpp b/al/filter.cpp index 1753580e..73067fd9 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -360,7 +360,7 @@ ALfilter *AllocFilter(ALCdevice *device) auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask)); ASSUME(slidx < 64); - ALfilter *filter{::new(sublist->Filters + slidx) ALfilter{}}; + ALfilter *filter{al::construct_at(sublist->Filters + slidx)}; InitFilterParams(filter, AL_FILTER_NULL); /* Add 1 to avoid filter ID 0. */ diff --git a/al/source.cpp b/al/source.cpp index e28b938f..734a3308 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -743,7 +743,7 @@ ALsource *AllocSource(ALCcontext *context) auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask)); ASSUME(slidx < 64); - ALsource *source{::new(sublist->Sources + slidx) ALsource{}}; + ALsource *source{al::construct_at(sublist->Sources + slidx)}; /* Add 1 to avoid source ID 0. */ source->id = ((lidx<<6) | slidx) + 1; |