diff options
author | Chris Robinson <[email protected]> | 2019-09-01 17:54:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-01 17:54:17 -0700 |
commit | bb35e24c9ba7ec01c05fc1f07ef737c15821283a (patch) | |
tree | 446a56e69f7cce88a07ada7848298cdfbc9a775a /al/auxeffectslot.cpp | |
parent | 727217ce0a9765270551ad6e10a25ee0b7fb74e6 (diff) |
Avoid unnecessary placement new definitions
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r-- | al/auxeffectslot.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index b2f2c249..3eb8b80a 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -173,13 +173,9 @@ ALeffectslot *AllocEffectSlot(ALCcontext *context) { return entry.FreeMask != 0; } ); auto lidx = static_cast<ALsizei>(std::distance(context->mEffectSlotList.begin(), sublist)); - ALeffectslot *slot; ALsizei slidx; if LIKELY(sublist != context->mEffectSlotList.end()) - { slidx = CTZ64(sublist->FreeMask); - slot = sublist->EffectSlots + slidx; - } else { /* Don't allocate so many list entries that the 32-bit ID could @@ -203,10 +199,9 @@ ALeffectslot *AllocEffectSlot(ALCcontext *context) } slidx = 0; - slot = sublist->EffectSlots + slidx; } - slot = new (slot) ALeffectslot{}; + ALeffectslot *slot{::new (sublist->EffectSlots + slidx) ALeffectslot{}}; ALenum err{InitEffectSlot(slot)}; if(err != AL_NO_ERROR) { |