From 1381a951bea78c67281a2e844e6db1dedbd5ed7c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 15 Dec 2023 10:00:23 -0800 Subject: Properly check if size_t is larger than uint32_t --- common/ringbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/ringbuffer.cpp') 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::max() > std::numeric_limits::max()) + if constexpr(sizeof(size_t) > sizeof(uint32_t)) power_of_two |= power_of_two>>32; } ++power_of_two; -- cgit v1.2.3