diff options
-rw-r--r-- | common/ringbuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ringbuffer.cpp b/common/ringbuffer.cpp index 13db7eba..96a2b615 100644 --- a/common/ringbuffer.cpp +++ b/common/ringbuffer.cpp @@ -42,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(std::numeric_limits<size_t>::max() > std::numeric_limits<int32_t>::max()) + if constexpr(sizeof(size_t) > sizeof(uint32_t)) power_of_two |= power_of_two>>32; } ++power_of_two; |