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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2019-05-31 17:12:21 +0300
committerRay Molenkamp <github@lazydodo.com>2019-05-31 17:12:21 +0300
commit3a72c9aa33c38b2005edd23834be2d2ecac050fc (patch)
treed73efb670f558c708c7ef873235ba1a4936c3325 /source/blender/blenlib
parent6eebeb577db65afe81930fd7f460556ee9fa635b (diff)
Cleanup: use static_assert on MSVC versions that support it.
This greatly improves the error message
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_assert.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h
index 6942c87caec..7fb91656edb 100644
--- a/source/blender/blenlib/BLI_assert.h
+++ b/source/blender/blenlib/BLI_assert.h
@@ -89,7 +89,11 @@ extern "C" {
# define BLI_STATIC_ASSERT(a, msg) static_assert(a, msg);
#elif defined(_MSC_VER)
/* 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__)
/* Workaround error with coverity */
# define BLI_STATIC_ASSERT(a, msg)