Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-10-03 17:01:59 +0300
committerJulian Eisel <julian@blender.org>2020-10-03 17:10:15 +0300
commit0bae2662f455c2866ce769fdc73b3068f8239bd0 (patch)
tree49fc275077b4cc7ebb77086cbbcb661fd9b7227f /source/blender/makesrna/intern/rna_wm.c
parente839179b014a2dac2b5cab6425bf7c382b9b0d1c (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.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index c31e49fce97..f3438aaa835 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -512,8 +512,6 @@ const EnumPropertyItem rna_enum_wm_report_items[] = {
#ifdef RNA_RUNTIME
-# include <assert.h>
-
# include "BLI_string_utils.h"
# include "WM_api.h"
@@ -1747,7 +1745,7 @@ static void rna_Operator_bl_idname_set(PointerRNA *ptr, const char *value)
BLI_strncpy(str, value, OP_MAX_TYPENAME); /* 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");
}
}
@@ -1759,7 +1757,7 @@ static void rna_Operator_bl_label_set(PointerRNA *ptr, const char *value)
BLI_strncpy(str, value, OP_MAX_TYPENAME); /* 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");
}
}
@@ -1771,7 +1769,7 @@ static void rna_Operator_bl_translation_context_set(PointerRNA *ptr, const char
BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
}
else {
- assert(!"setting the bl_translation_context on a non-builtin operator");
+ BLI_assert(!"setting the bl_translation_context on a non-builtin operator");
}
}
@@ -1783,7 +1781,7 @@ static void rna_Operator_bl_description_set(PointerRNA *ptr, const char *value)
BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
}
else {
- assert(!"setting the bl_description on a non-builtin operator");
+ BLI_assert(!"setting the bl_description on a non-builtin operator");
}
}
@@ -1795,7 +1793,7 @@ static void rna_Operator_bl_undo_group_set(PointerRNA *ptr, const char *value)
BLI_strncpy(str, value, OP_MAX_TYPENAME); /* utf8 already ensured */
}
else {
- assert(!"setting the bl_undo_group on a non-builtin operator");
+ BLI_assert(!"setting the bl_undo_group on a non-builtin operator");
}
}