From e7082fbdb0eab8f8ba435ee6f3c065f0f57966b3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 21 Jul 2021 20:39:51 +1000 Subject: Cleanup: replace BLI_assert(0 && "text") with BLI_assert_msg --- source/blender/makesrna/intern/rna_collection.c | 6 ++-- source/blender/makesrna/intern/rna_rna.c | 40 ++++++++++++------------- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index 752c9495e50..608a8e51b09 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -170,7 +170,7 @@ static bool rna_Collection_objects_override_apply(Main *bmain, Collection *coll_dst = (Collection *)ptr_dst->owner_id; if (ptr_item_dst->type == NULL || ptr_item_src->type == NULL) { - // BLI_assert(0 && "invalid source or destination object."); + // BLI_assert_msg(0, "invalid source or destination object."); return false; } @@ -185,7 +185,7 @@ static bool rna_Collection_objects_override_apply(Main *bmain, &coll_dst->gobject, ob_dst, offsetof(CollectionObject, ob)); if (cob_dst == NULL) { - BLI_assert(0 && "Could not find destination object in destination collection!"); + BLI_assert_msg(0, "Could not find destination object in destination collection!"); return false; } @@ -288,7 +288,7 @@ static bool rna_Collection_children_override_apply(Main *bmain, &coll_dst->children, subcoll_dst, offsetof(CollectionChild, collection)); if (collchild_dst == NULL) { - BLI_assert(0 && "Could not find destination sub-collection in destination collection!"); + BLI_assert_msg(0, "Could not find destination sub-collection in destination collection!"); return false; } diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 6008ef40b60..42bdc7442f4 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -2089,7 +2089,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), switch (RNA_property_type(prop_local)) { case PROP_BOOLEAN: /* TODO: support boolean ops? Really doubt this would ever be useful though. */ - BLI_assert(0 && "Boolean properties support no override diff operation"); + BLI_assert_msg(0, "Boolean properties support no override diff operation"); break; case PROP_INT: { int prop_min, prop_max; @@ -2143,7 +2143,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), break; } default: - BLI_assert(0 && "Unsupported RNA override diff operation on integer"); + BLI_assert_msg(0, "Unsupported RNA override diff operation on integer"); break; } @@ -2175,7 +2175,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), break; } default: - BLI_assert(0 && "Unsupported RNA override diff operation on integer"); + BLI_assert_msg(0, "Unsupported RNA override diff operation on integer"); break; } } @@ -2256,7 +2256,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), break; } default: - BLI_assert(0 && "Unsupported RNA override diff operation on float"); + BLI_assert_msg(0, "Unsupported RNA override diff operation on float"); break; } @@ -2299,7 +2299,7 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), break; } default: - BLI_assert(0 && "Unsupported RNA override diff operation on float"); + BLI_assert_msg(0, "Unsupported RNA override diff operation on float"); break; } } @@ -2307,17 +2307,17 @@ bool rna_property_override_store_default(Main *UNUSED(bmain), } case PROP_ENUM: /* TODO: support add/sub, for bitflags? */ - BLI_assert(0 && "Enum properties support no override diff operation"); + BLI_assert_msg(0, "Enum properties support no override diff operation"); break; case PROP_POINTER: - BLI_assert(0 && "Pointer properties support no override diff operation"); + BLI_assert_msg(0, "Pointer properties support no override diff operation"); break; case PROP_STRING: - BLI_assert(0 && "String properties support no override diff operation"); + BLI_assert_msg(0, "String properties support no override diff operation"); break; case PROP_COLLECTION: /* XXX TODO: support this of course... */ - BLI_assert(0 && "Collection properties support no override diff operation"); + BLI_assert_msg(0, "Collection properties support no override diff operation"); break; default: break; @@ -2364,7 +2364,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), RNA_property_boolean_set_array(ptr_dst, prop_dst, array_a); break; default: - BLI_assert(0 && "Unsupported RNA override operation on boolean"); + BLI_assert_msg(0, "Unsupported RNA override operation on boolean"); return false; } @@ -2380,7 +2380,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), RNA_PROPERTY_SET_SINGLE(boolean, ptr_dst, prop_dst, index, value); break; default: - BLI_assert(0 && "Unsupported RNA override operation on boolean"); + BLI_assert_msg(0, "Unsupported RNA override operation on boolean"); return false; } } @@ -2421,7 +2421,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), } break; default: - BLI_assert(0 && "Unsupported RNA override operation on integer"); + BLI_assert_msg(0, "Unsupported RNA override operation on integer"); return false; } @@ -2459,7 +2459,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), storage_value); break; default: - BLI_assert(0 && "Unsupported RNA override operation on integer"); + BLI_assert_msg(0, "Unsupported RNA override operation on integer"); return false; } } @@ -2506,7 +2506,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), } break; default: - BLI_assert(0 && "Unsupported RNA override operation on float"); + BLI_assert_msg(0, "Unsupported RNA override operation on float"); return false; } @@ -2552,7 +2552,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), storage_value); break; default: - BLI_assert(0 && "Unsupported RNA override operation on float"); + BLI_assert_msg(0, "Unsupported RNA override operation on float"); return false; } } @@ -2566,7 +2566,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), break; /* TODO: support add/sub, for bitflags? */ default: - BLI_assert(0 && "Unsupported RNA override operation on enum"); + BLI_assert_msg(0, "Unsupported RNA override operation on enum"); return false; } return true; @@ -2579,7 +2579,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), RNA_property_pointer_set(ptr_dst, prop_dst, value, NULL); break; default: - BLI_assert(0 && "Unsupported RNA override operation on pointer"); + BLI_assert_msg(0, "Unsupported RNA override operation on pointer"); return false; } return true; @@ -2593,7 +2593,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), RNA_property_string_set(ptr_dst, prop_dst, value); break; default: - BLI_assert(0 && "Unsupported RNA override operation on string"); + BLI_assert_msg(0, "Unsupported RNA override operation on string"); return false; } @@ -2609,7 +2609,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), const bool is_dst_idprop = (prop_dst->magic != RNA_MAGIC) || (prop_dst->flag & PROP_IDPROPERTY) != 0; if (!(is_src_idprop && is_dst_idprop)) { - BLI_assert(0 && "You need to define a specific override apply callback for collections"); + BLI_assert_msg(0, "You need to define a specific override apply callback for collections"); return false; } @@ -2668,7 +2668,7 @@ bool rna_property_override_apply_default(Main *UNUSED(bmain), return RNA_property_collection_move(ptr_dst, prop_dst, item_index_added, item_index_dst); } default: - BLI_assert(0 && "Unsupported RNA override operation on collection"); + BLI_assert_msg(0, "Unsupported RNA override operation on collection"); return false; } } -- cgit v1.2.3