aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 22:31:51 -0800
committerChris Robinson <[email protected]>2018-11-18 22:31:51 -0800
commit81aed2ea01904c73156ade21faa5f12806685f72 (patch)
tree7c617a56a1795a1a33169d9dfb2e2c72bd126680 /Alc
parentbecbaab2dc4cf39fc3c0f64f352a76aee6d8e26c (diff)
Use a normal vector for buffer sublists
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index f4a64199..ae9a6e92 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2388,7 +2388,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
ALCdevice_struct::ALCdevice_struct(DeviceType type)
: Type{type}
{
- VECTOR_INIT(BufferList);
almtx_init(&BufferLock, almtx_plain);
VECTOR_INIT(EffectList);
@@ -2416,10 +2415,11 @@ ALCdevice_struct::~ALCdevice_struct()
almtx_destroy(&BackendLock);
ReleaseALBuffers(this);
-#define FREE_BUFFERSUBLIST(x) al_free((x)->Buffers)
- VECTOR_FOR_EACH(BufferSubList, BufferList, FREE_BUFFERSUBLIST);
-#undef FREE_BUFFERSUBLIST
- VECTOR_DEINIT(BufferList);
+ std::for_each(BufferList.begin(), BufferList.end(),
+ [](BufferSubList &entry) noexcept -> void
+ { al_free(entry.Buffers); }
+ );
+ BufferList.clear();
almtx_destroy(&BufferLock);
ReleaseALEffects(this);