diff options
author | Julian Eisel <julian@blender.org> | 2020-10-03 17:01:59 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-10-03 17:10:15 +0300 |
commit | 0bae2662f455c2866ce769fdc73b3068f8239bd0 (patch) | |
tree | 49fc275077b4cc7ebb77086cbbcb661fd9b7227f /source/blender/blenlib | |
parent | e839179b014a2dac2b5cab6425bf7c382b9b0d1c (diff) |
Cleanup: Remove/replace C standard library assert() and header usages
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/buffer.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 1 |
6 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 73f8c2717b0..f126c5a977b 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -38,8 +38,6 @@ * #BLI_bvhtree_range_query */ -#include <assert.h> - #include "MEM_guardedalloc.h" #include "BLI_alloca.h" diff --git a/source/blender/blenlib/intern/buffer.c b/source/blender/blenlib/intern/buffer.c index fb4350501cd..bac4786a2e9 100644 --- a/source/blender/blenlib/intern/buffer.c +++ b/source/blender/blenlib/intern/buffer.c @@ -30,8 +30,8 @@ * BLI_buffer_declare_static(int, my_int_array, BLI_BUFFER_NOP, 32); * * BLI_buffer_append(my_int_array, int, 42); - * assert(my_int_array.count == 1); - * assert(BLI_buffer_at(my_int_array, int, 0) == 42); + * BLI_assert(my_int_array.count == 1); + * BLI_assert(BLI_buffer_at(my_int_array, int, 0) == 42); * * BLI_buffer_free(&my_int_array); * \endcode diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 4b62d6b9b5b..132aeb3ace2 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -24,8 +24,6 @@ * \ingroup bli */ -#include <assert.h> - #include "BLI_math.h" #include "BLI_utildefines.h" diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 19bb6a2efba..656f37c9f18 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -24,7 +24,6 @@ */ #include "BLI_math.h" -#include <assert.h> #include "BLI_strict_flags.h" diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 7c4ac934695..c7cd1901164 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -24,7 +24,6 @@ */ #include "BLI_math.h" -#include <assert.h> #include "BLI_strict_flags.h" diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 6328c887063..d4f0467b31b 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -22,7 +22,6 @@ * \ingroup bli */ -#include <assert.h> #include <ctype.h> #include <stdlib.h> #include <string.h> |