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 /Alc | |
parent | 81aed2ea01904c73156ade21faa5f12806685f72 (diff) |
Use a normal vector for effect sublists
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index ae9a6e92..56e500d4 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2390,7 +2390,6 @@ ALCdevice_struct::ALCdevice_struct(DeviceType type) { almtx_init(&BufferLock, almtx_plain); - VECTOR_INIT(EffectList); almtx_init(&EffectLock, almtx_plain); VECTOR_INIT(FilterList); @@ -2423,10 +2422,11 @@ ALCdevice_struct::~ALCdevice_struct() almtx_destroy(&BufferLock); ReleaseALEffects(this); -#define FREE_EFFECTSUBLIST(x) al_free((x)->Effects) - VECTOR_FOR_EACH(EffectSubList, EffectList, FREE_EFFECTSUBLIST); -#undef FREE_EFFECTSUBLIST - VECTOR_DEINIT(EffectList); + std::for_each(EffectList.begin(), EffectList.end(), + [](EffectSubList &entry) noexcept -> void + { al_free(entry.Effects); } + ); + EffectList.clear(); almtx_destroy(&EffectLock); ReleaseALFilters(this); |