[Bf-blender-cvs] [e55c29b4ec1] master: BLI_math: don't use asserts in inline API
Campbell Barton
noreply at git.blender.org
Thu Mar 15 01:03:43 CET 2018
Commit: e55c29b4ec1a895b151b13738423205607688b85
Author: Campbell Barton
Date: Thu Mar 15 11:10:11 2018 +1100
Branches: master
https://developer.blender.org/rBe55c29b4ec1a895b151b13738423205607688b85
BLI_math: don't use asserts in inline API
Requires BLI_utildefines.h to be included first,
(already noted in other inline code).
Possible alternative could be to move BLI_assert into own header.
===================================================================
M source/blender/blenlib/intern/math_bits_inline.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_bits_inline.c b/source/blender/blenlib/intern/math_bits_inline.c
index 37fdcd7878a..3829b9d219c 100644
--- a/source/blender/blenlib/intern/math_bits_inline.c
+++ b/source/blender/blenlib/intern/math_bits_inline.c
@@ -33,7 +33,9 @@
MINLINE int bitscan_forward_i(int a)
{
+#if 0 /* No BLI_assert in INLINE :/ */
BLI_assert(a != 0);
+#endif
# ifdef _MSC_VER
unsigned long ctz;
_BitScanForward(&ctz, a);
More information about the Bf-blender-cvs
mailing list