From f92cc479d82fbf85591d8918bbf469c4b329c31c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 Oct 2021 08:02:57 -0700 Subject: Silence some static analysis warnings --- al/buffer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'al/buffer.cpp') diff --git a/al/buffer.cpp b/al/buffer.cpp index b1e4bdf5..088775b8 100644 --- a/al/buffer.cpp +++ b/al/buffer.cpp @@ -395,11 +395,10 @@ ALbuffer *AllocBuffer(ALCdevice *device) { auto sublist = std::find_if(device->BufferList.begin(), device->BufferList.end(), [](const BufferSubList &entry) noexcept -> bool - { return entry.FreeMask != 0; } - ); - + { return entry.FreeMask != 0; }); auto lidx = static_cast(std::distance(device->BufferList.begin(), sublist)); auto slidx = static_cast(al::countr_zero(sublist->FreeMask)); + ASSUME(slidx < 64); ALbuffer *buffer{::new (sublist->Buffers + slidx) ALbuffer{}}; -- cgit v1.2.3