Cleanup: use static_assert on MSVC versions that support it.
This greatly improves the error message
This commit is contained in:
@@ -89,7 +89,11 @@ extern "C" {
|
|||||||
# define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
|
# define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
/* Visual Studio */
|
/* Visual Studio */
|
||||||
# define BLI_STATIC_ASSERT(a, msg) _STATIC_ASSERT(a);
|
# if _MSC_VER > 1910
|
||||||
|
# define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
|
||||||
|
# else
|
||||||
|
# define BLI_STATIC_ASSERT(a, msg) _STATIC_ASSERT(a);
|
||||||
|
# endif
|
||||||
#elif defined(__COVERITY__)
|
#elif defined(__COVERITY__)
|
||||||
/* Workaround error with coverity */
|
/* Workaround error with coverity */
|
||||||
# define BLI_STATIC_ASSERT(a, msg)
|
# define BLI_STATIC_ASSERT(a, msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user