Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-06-02 23:04:57 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-06-02 23:04:57 +0300
commit958089794bc028d9dba8f3687774e03b7a3b0b7b (patch)
tree318f5677c71d9e8387ebdaac6f6f8cf216d34e43
parenta53c8befdc914e58c0fbd1d159c11ff85d4f05df (diff)
Fix MSVC warnings snafu.
-rw-r--r--client/tracy_concurrentqueue.h8
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)