aboutsummaryrefslogtreecommitdiffstats
path: root/al/buffer.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-10-03 08:02:57 -0700
committerChris Robinson <[email protected]>2021-10-03 08:02:57 -0700
commitf92cc479d82fbf85591d8918bbf469c4b329c31c (patch)
treef18d486b88aa274cd172496c133e6a82c1033dbb /al/buffer.cpp
parent53d9033ec70019353dfa255b63cbe9eb21c70888 (diff)
Silence some static analysis warnings
Diffstat (limited to 'al/buffer.cpp')
-rw-r--r--al/buffer.cpp5
1 files changed, 2 insertions, 3 deletions
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<ALuint>(std::distance(device->BufferList.begin(), sublist));
auto slidx = static_cast<ALuint>(al::countr_zero(sublist->FreeMask));
+ ASSUME(slidx < 64);
ALbuffer *buffer{::new (sublist->Buffers + slidx) ALbuffer{}};