diff options
author | Chris Robinson <[email protected]> | 2019-01-11 07:28:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-11 07:28:44 -0800 |
commit | 81e7222633fefd29890e8f1e18af86c4985604f4 (patch) | |
tree | 33271bf0aae1c7acfac1cadb5139e8f87a976fd6 /Alc/alc.cpp | |
parent | 8aedaea5fb92d9cfed0a3e1f959f903fca713ec3 (diff) |
Use a flexible array for the active effect slots
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index ca13e911..cea1fb61 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2325,15 +2325,11 @@ static ALvoid InitContext(ALCcontext *Context) //Validate Context if(!Context->DefaultSlot) - auxslots = new ALeffectslotArray{}; + auxslots = ALeffectslot::CreatePtrArray(0); else { - /* Allocate twice as much space for effect slots so the mixer has a - * place to sort them. - */ - auxslots = new ALeffectslotArray{}; - auxslots->reserve(2); - auxslots->push_back(Context->DefaultSlot.get()); + auxslots = ALeffectslot::CreatePtrArray(1); + (*auxslots)[0] = Context->DefaultSlot.get(); } Context->ActiveAuxSlots.store(auxslots, std::memory_order_relaxed); |