diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-06-02 23:04:57 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-06-02 23:04:57 +0300 |
commit | 958089794bc028d9dba8f3687774e03b7a3b0b7b (patch) | |
tree | 318f5677c71d9e8387ebdaac6f6f8cf216d34e43 | |
parent | a53c8befdc914e58c0fbd1d159c11ff85d4f05df (diff) |
Fix MSVC warnings snafu.
-rw-r--r-- | client/tracy_concurrentqueue.h | 8 |
1 files 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<typename T> - static inline bool circular_less_than(T a, T b) - { #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4554) #endif + template<typename T> + static inline bool circular_less_than(T a, T b) + { static_assert(std::is_integral<T>::value && !std::numeric_limits<T>::is_signed, "circular_less_than is intended to be used only with unsigned integer types"); return static_cast<T>(a - b) > static_cast<T>(static_cast<T>(1) << static_cast<T>(sizeof(T) * CHAR_BIT - 1)); + } #ifdef _MSC_VER #pragma warning(pop) #endif - } template<typename U> static inline char* align_for(char* ptr) |