diff options
author | Chris Robinson <[email protected]> | 2018-11-18 22:45:55 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 22:50:04 -0800 |
commit | 362979cefb413e04dd4698d282779436e0a86bbc (patch) | |
tree | b51796cf1a6bab95a902e4d2e2cb1aade1da2681 /OpenAL32/alAuxEffectSlot.cpp | |
parent | 81aed2ea01904c73156ade21faa5f12806685f72 (diff) |
Use a normal vector for effect sublists
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.cpp')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index 6a0cc34c..fc4b4d1b 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -87,16 +87,15 @@ static inline ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id) static inline ALeffect *LookupEffect(ALCdevice *device, ALuint id) { - EffectSubList *sublist; ALuint lidx = (id-1) >> 6; ALsizei slidx = (id-1) & 0x3f; - if(UNLIKELY(lidx >= VECTOR_SIZE(device->EffectList))) + if(UNLIKELY(lidx >= device->EffectList.size())) return nullptr; - sublist = &VECTOR_ELEM(device->EffectList, lidx); - if(UNLIKELY(sublist->FreeMask & (U64(1)<<slidx))) + EffectSubList &sublist = device->EffectList[lidx]; + if(UNLIKELY(sublist.FreeMask & (U64(1)<<slidx))) return nullptr; - return sublist->Effects + slidx; + return sublist.Effects + slidx; } |