diff options
author | Chris Robinson <[email protected]> | 2018-11-18 23:02:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-18 23:02:31 -0800 |
commit | e0d0faaa634b5e3f14f0a3c477aba4dbf78683fb (patch) | |
tree | 19c7225703e7e5f320f5254673b959d10b888b04 /Alc/alc.cpp | |
parent | 362979cefb413e04dd4698d282779436e0a86bbc (diff) |
Use a normal vector for filter sublists
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 56e500d4..24783510 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2389,10 +2389,7 @@ ALCdevice_struct::ALCdevice_struct(DeviceType type) : Type{type} { almtx_init(&BufferLock, almtx_plain); - almtx_init(&EffectLock, almtx_plain); - - VECTOR_INIT(FilterList); almtx_init(&FilterLock, almtx_plain); almtx_init(&BackendLock, almtx_plain); @@ -2430,10 +2427,11 @@ ALCdevice_struct::~ALCdevice_struct() almtx_destroy(&EffectLock); ReleaseALFilters(this); -#define FREE_FILTERSUBLIST(x) al_free((x)->Filters) - VECTOR_FOR_EACH(FilterSubList, FilterList, FREE_FILTERSUBLIST); -#undef FREE_FILTERSUBLIST - VECTOR_DEINIT(FilterList); + std::for_each(FilterList.begin(), FilterList.end(), + [](FilterSubList &entry) noexcept -> void + { al_free(entry.Filters); } + ); + FilterList.clear(); almtx_destroy(&FilterLock); HrtfList.clear(); |