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/makesrna/intern/rna_wm_gizmo.c | |
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/makesrna/intern/rna_wm_gizmo.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_gizmo.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c index c19998b4803..971991869e2 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo.c +++ b/source/blender/makesrna/intern/rna_wm_gizmo.c @@ -45,8 +45,6 @@ #ifdef RNA_RUNTIME -# include <assert.h> - # include "BLI_string_utils.h" # include "WM_api.h" @@ -240,7 +238,7 @@ static void rna_Gizmo_bl_idname_set(PointerRNA *ptr, const char *value) BLI_strncpy(str, value, MAX_NAME); /* utf8 already ensured */ } else { - assert(!"setting the bl_idname on a non-builtin operator"); + BLI_assert(!"setting the bl_idname on a non-builtin operator"); } } @@ -632,7 +630,7 @@ static void rna_GizmoGroup_bl_idname_set(PointerRNA *ptr, const char *value) BLI_strncpy(str, value, MAX_NAME); /* utf8 already ensured */ } else { - assert(!"setting the bl_idname on a non-builtin operator"); + BLI_assert(!"setting the bl_idname on a non-builtin operator"); } } @@ -644,7 +642,7 @@ static void rna_GizmoGroup_bl_label_set(PointerRNA *ptr, const char *value) BLI_strncpy(str, value, MAX_NAME); /* utf8 already ensured */ } else { - assert(!"setting the bl_label on a non-builtin operator"); + BLI_assert(!"setting the bl_label on a non-builtin operator"); } } |