diff options
author | Chris Robinson <[email protected]> | 2023-12-08 10:11:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-08 10:11:08 -0800 |
commit | 040c172cdf186c9ccfb0642aa9ac598f115bb46b (patch) | |
tree | 0aaefde29bb9151042933f97f914946e007047e7 /common | |
parent | 4527b873788373edb630046b0ab586255aa15e44 (diff) |
Clean up some more clang-tidy warnings
Diffstat (limited to 'common')
-rw-r--r-- | common/ringbuffer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/ringbuffer.cpp b/common/ringbuffer.cpp index af1f3669..0d3b7e30 100644 --- a/common/ringbuffer.cpp +++ b/common/ringbuffer.cpp @@ -24,7 +24,9 @@ #include <algorithm> #include <climits> +#include <limits> #include <stdexcept> +#include <stdint.h> #include "almalloc.h" @@ -40,7 +42,7 @@ RingBufferPtr RingBuffer::Create(std::size_t sz, std::size_t elem_sz, int limit_ power_of_two |= power_of_two>>4; power_of_two |= power_of_two>>8; power_of_two |= power_of_two>>16; - if constexpr(SIZE_MAX > UINT_MAX) + if constexpr(std::numeric_limits<size_t>::max() > std::numeric_limits<int32_t>::max()) power_of_two |= power_of_two>>32; } ++power_of_two; |