From 958089794bc028d9dba8f3687774e03b7a3b0b7b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 2 Jun 2022 22:04:57 +0200 Subject: [PATCH] Fix MSVC warnings snafu. --- client/tracy_concurrentqueue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/tracy_concurrentqueue.h b/client/tracy_concurrentqueue.h index a1f41738..75ef2a81 100644 --- a/client/tracy_concurrentqueue.h +++ b/client/tracy_concurrentqueue.h @@ -210,19 +210,19 @@ namespace details } }; - template - static inline bool circular_less_than(T a, T b) - { #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4554) #endif + template + static inline bool circular_less_than(T a, T b) + { static_assert(std::is_integral::value && !std::numeric_limits::is_signed, "circular_less_than is intended to be used only with unsigned integer types"); return static_cast(a - b) > static_cast(static_cast(1) << static_cast(sizeof(T) * CHAR_BIT - 1)); + } #ifdef _MSC_VER #pragma warning(pop) #endif - } template static inline char* align_for(char* ptr)