diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-15 22:03:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-15 22:03:29 +0300 |
commit | 995ccf816886cc0fdcfcde073581f44159e21b34 (patch) | |
tree | 17a765c46569308aa795d96da07c017a1bc4711f /source/blender/blenlib/intern | |
parent | 71139cedcb03001d746338b31e08da6854769832 (diff) |
BLI_assert: extract from BLI_utildefines
BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_bits_inline.c | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 1f517471407..eed06c7841b 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -368,10 +368,8 @@ MINLINE int compare_ff_relative(float a, float b, const float max_diff, const in { union {float f; int i;} ua, ub; -#if 0 /* No BLI_assert in INLINE :/ */ BLI_assert(sizeof(float) == sizeof(int)); BLI_assert(max_ulps < (1 << 22)); -#endif if (fabsf(a - b) <= max_diff) { return 1; diff --git a/source/blender/blenlib/intern/math_bits_inline.c b/source/blender/blenlib/intern/math_bits_inline.c index 933ded55d53..9b16756134e 100644 --- a/source/blender/blenlib/intern/math_bits_inline.c +++ b/source/blender/blenlib/intern/math_bits_inline.c @@ -33,10 +33,8 @@ MINLINE int bitscan_forward_i(int a) { -#if 0 /* No BLI_assert in INLINE :/ */ BLI_assert(a != 0); -#endif -# ifdef _MSC_VER +#ifdef _MSC_VER unsigned long ctz; _BitScanForward(&ctz, a); return ctz; @@ -64,10 +62,8 @@ MINLINE unsigned int bitscan_forward_clear_uint(unsigned int *a) MINLINE int bitscan_reverse_i(int a) { -#if 0 /* No BLI_assert in INLINE :/ */ BLI_assert(a != 0); -#endif -# ifdef _MSC_VER +#ifdef _MSC_VER unsigned long clz; _BitScanReverse(&clz, a); return clz; |