From 5b37e2339bc91de3424b51600c3d3b96401d0b9c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 11 Sep 2019 03:59:53 -0700 Subject: Simplify flexible array member usage --- alc/ringbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alc/ringbuffer.cpp') diff --git a/alc/ringbuffer.cpp b/alc/ringbuffer.cpp index d99676b8..d61f6129 100644 --- a/alc/ringbuffer.cpp +++ b/alc/ringbuffer.cpp @@ -48,7 +48,7 @@ RingBufferPtr CreateRingBuffer(size_t sz, size_t elem_sz, int limit_writes) if(power_of_two < sz) return nullptr; const size_t bufbytes{power_of_two * elem_sz}; - RingBufferPtr rb{new (al_calloc(16, sizeof(*rb) + bufbytes)) RingBuffer{bufbytes}}; + RingBufferPtr rb{new (FamCount{bufbytes}) RingBuffer{bufbytes}}; rb->mWriteSize = limit_writes ? sz : (power_of_two-1); rb->mSizeMask = power_of_two - 1; rb->mElemSize = elem_sz; -- cgit v1.2.3