aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 23:02:31 -0800
committerChris Robinson <[email protected]>2018-11-18 23:02:31 -0800
commite0d0faaa634b5e3f14f0a3c477aba4dbf78683fb (patch)
tree19c7225703e7e5f320f5254673b959d10b888b04 /Alc/alc.cpp
parent362979cefb413e04dd4698d282779436e0a86bbc (diff)
Use a normal vector for filter sublists
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp12
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();