From 8e8a6b80cf2749d176d14eaa3bbfd0eccc9ec75e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Jul 2021 18:23:28 +1000 Subject: Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text") This shows the text as part of the assertion message. --- source/blender/blenkernel/intern/object.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/object.c') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 912b5e0a0dd..941db80b76c 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -205,7 +205,8 @@ static void object_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const in } else if (ob_dst->mat != NULL || ob_dst->matbits != NULL) { /* This shall not be needed, but better be safe than sorry. */ - BLI_assert(!"Object copy: non-NULL material pointers with zero counter, should not happen."); + BLI_assert_msg( + 0, "Object copy: non-NULL material pointers with zero counter, should not happen."); ob_dst->mat = NULL; ob_dst->matbits = NULL; } @@ -1532,7 +1533,8 @@ bool BKE_object_modifier_stack_copy(Object *ob_dst, const int flag_subdata) { if ((ob_dst->type == OB_GPENCIL) != (ob_src->type == OB_GPENCIL)) { - BLI_assert(!"Trying to copy a modifier stack between a GPencil object and another type."); + BLI_assert_msg(0, + "Trying to copy a modifier stack between a GPencil object and another type."); return false; } @@ -3335,7 +3337,7 @@ static void give_parvert(Object *par, int nr, float vec[3]) } BLI_mutex_unlock(&vparent_lock); #else - BLI_assert(!"Not safe for threading"); + BLI_assert_msg(0, "Not safe for threading"); BM_mesh_elem_table_ensure(em->bm, BM_VERT); #endif } -- cgit v1.2.3