update headers
This commit is contained in:
@@ -116,8 +116,14 @@
|
||||
# define UTILS_HAS_HYPER_THREADING 0
|
||||
#endif
|
||||
|
||||
#if defined(__EMSCRIPTEN__) || defined(FILAMENT_SINGLE_THREADED)
|
||||
#if defined(FILAMENT_SINGLE_THREADED)
|
||||
# define UTILS_HAS_THREADING 0
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
# if defined(__EMSCRIPTEN_PTHREADS__) && defined(FILAMENT_WASM_THREADS)
|
||||
# define UTILS_HAS_THREADING 1
|
||||
# else
|
||||
# define UTILS_HAS_THREADING 0
|
||||
# endif
|
||||
#else
|
||||
# define UTILS_HAS_THREADING 1
|
||||
#endif
|
||||
@@ -140,7 +146,7 @@
|
||||
#define UTILS_PURE
|
||||
#endif
|
||||
|
||||
#if __has_attribute(maybe_unused)
|
||||
#if __has_attribute(maybe_unused) || (defined(_MSC_VER) && _MSC_VER >= 1911)
|
||||
#define UTILS_UNUSED [[maybe_unused]]
|
||||
#define UTILS_UNUSED_IN_RELEASE [[maybe_unused]]
|
||||
#elif __has_attribute(unused)
|
||||
@@ -169,9 +175,11 @@
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// MSVC does not support loop unrolling hints
|
||||
# define UTILS_UNROLL
|
||||
# define UTILS_NOUNROLL
|
||||
#else
|
||||
// C++11 allows pragmas to be specified as part of defines using the _Pragma syntax.
|
||||
# define UTILS_UNROLL _Pragma("unroll")
|
||||
# define UTILS_NOUNROLL _Pragma("nounroll")
|
||||
#endif
|
||||
|
||||
@@ -232,5 +240,18 @@ typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define UTILS_WARNING_PUSH _Pragma("warning( push )")
|
||||
# define UTILS_WARNING_POP _Pragma("warning( pop )")
|
||||
# define UTILS_WARNING_ENABLE_PADDED _Pragma("warning(1: 4324)")
|
||||
#elif defined(__clang__)
|
||||
# define UTILS_WARNING_PUSH _Pragma("clang diagnostic push")
|
||||
# define UTILS_WARNING_POP _Pragma("clang diagnostic pop")
|
||||
# define UTILS_WARNING_ENABLE_PADDED _Pragma("clang diagnostic warning \"-Wpadded\"")
|
||||
#else
|
||||
# define UTILS_WARNING_PUSH
|
||||
# define UTILS_WARNING_POP
|
||||
# define UTILS_WARNING_ENABLE_PADDED
|
||||
#endif
|
||||
|
||||
#endif // TNT_UTILS_COMPILER_H
|
||||
|
||||
Reference in New Issue
Block a user