BLI_math: don't use asserts in inline API
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Mar 2018 00:10:11 +0000 (11:10 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Mar 2018 00:12:10 +0000 (11:12 +1100)
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.

source/blender/blenlib/intern/math_bits_inline.c

index 37fdcd7..3829b9d 100644 (file)
@@ -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);