From e0d0faaa634b5e3f14f0a3c477aba4dbf78683fb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 18 Nov 2018 23:02:31 -0800 Subject: Use a normal vector for filter sublists --- Alc/alc.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Alc') 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(); -- cgit v1.2.3