Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")

This shows the text as part of the assertion message.
This commit is contained in:
Campbell Barton 2021-07-15 18:23:28 +10:00
parent a63a0ee24b
commit 8e8a6b80cf
133 changed files with 217 additions and 209 deletions

View File

@ -214,7 +214,7 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
}
/* Should never be called. */
BLI_assert(!"should never be reached");
BLI_assert_msg(0, "should never be reached");
return op.template operator()<openvdb::FloatGrid>();
}

View File

@ -216,7 +216,7 @@ static bool binary_search_anim_path(const float *accum_len_arr,
if (UNLIKELY(cur_step == 0)) {
/* This should never happen unless there is something horribly wrong. */
CLOG_ERROR(&LOG, "Couldn't find any valid point on the animation path!");
BLI_assert(!"Couldn't find any valid point on the animation path!");
BLI_assert_msg(0, "Couldn't find any valid point on the animation path!");
return false;
}

View File

@ -1457,7 +1457,7 @@ static float nla_blend_value(const int blendmode,
return influence * (lower_value * strip_value) + (1 - influence) * lower_value;
case NLASTRIP_MODE_COMBINE:
BLI_assert(!"combine mode");
BLI_assert_msg(0, "combine mode");
ATTR_FALLTHROUGH;
default:
@ -1495,7 +1495,7 @@ static float nla_combine_value(const int mix_mode,
return lower_value * powf(strip_value / base_value, influence);
default:
BLI_assert(!"invalid mix mode");
BLI_assert_msg(0, "invalid mix mode");
return lower_value;
}
}
@ -1546,7 +1546,7 @@ static bool nla_blend_get_inverted_strip_value(const int blendmode,
return true;
case NLASTRIP_MODE_COMBINE:
BLI_assert(!"combine mode");
BLI_assert_msg(0, "combine mode");
ATTR_FALLTHROUGH;
default:
@ -1602,7 +1602,7 @@ static bool nla_combine_get_inverted_strip_value(const int mix_mode,
return true;
default:
BLI_assert(!"invalid mix mode");
BLI_assert_msg(0, "invalid mix mode");
return false;
}
}
@ -3033,7 +3033,7 @@ bool BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context,
NlaEvalChannel *nec = nlaevalchan_verify_key(eval_data, NULL, &key);
BLI_assert(nec);
if (nec->base_snapshot.length != count) {
BLI_assert(!"invalid value count");
BLI_assert_msg(0, "invalid value count");
nlaeval_snapshot_free_data(&blended_snapshot);
return false;
}

View File

@ -779,7 +779,7 @@ const char *BKE_appdir_folder_id_version(const int folder_id,
default:
path[0] = '\0'; /* in case check_is_dir is false */
ok = false;
BLI_assert(!"incorrect ID");
BLI_assert_msg(0, "incorrect ID");
break;
}
return ok ? path : NULL;

View File

@ -119,7 +119,7 @@ bool BKE_id_attribute_rename(ID *id,
ReportList *reports)
{
if (BKE_id_attribute_required(id, layer)) {
BLI_assert(!"Required attribute name is not editable");
BLI_assert_msg(0, "Required attribute name is not editable");
return false;
}
@ -202,7 +202,7 @@ AttributeDomain BKE_id_attribute_domain(ID *id, CustomDataLayer *layer)
}
}
BLI_assert(!"Custom data layer not found in geometry");
BLI_assert_msg(0, "Custom data layer not found in geometry");
return ATTR_DOMAIN_NUM;
}
@ -218,7 +218,7 @@ int BKE_id_attribute_data_length(ID *id, CustomDataLayer *layer)
}
}
BLI_assert(!"Custom data layer not found in geometry");
BLI_assert_msg(0, "Custom data layer not found in geometry");
return 0;
}

View File

@ -127,7 +127,7 @@ static void blender_version_init(void)
version_cycle = "";
}
else {
BLI_assert(!"Invalid Blender version cycle");
BLI_assert_msg(0, "Invalid Blender version cycle");
}
BLI_snprintf(blender_version_string,

View File

@ -191,7 +191,7 @@ static ID *collection_owner_get(Main *bmain, ID *id)
}
}
BLI_assert(!"Embedded collection with no owner. Critical Main inconsistency.");
BLI_assert_msg(0, "Embedded collection with no owner. Critical Main inconsistency.");
return NULL;
}
@ -522,7 +522,7 @@ bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy)
{
/* Master collection is not real datablock, can't be removed. */
if (collection->flag & COLLECTION_IS_MASTER) {
BLI_assert(!"Scene master collection can't be deleted");
BLI_assert_msg(0, "Scene master collection can't be deleted");
return false;
}

View File

@ -2339,7 +2339,7 @@ static void translike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
break;
default:
BLI_assert(!"Unknown Copy Transforms mix mode");
BLI_assert_msg(0, "Unknown Copy Transforms mix mode");
}
}
}
@ -2991,7 +2991,7 @@ static void actcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ
break;
default:
BLI_assert(!"Unknown Action mix mode");
BLI_assert_msg(0, "Unknown Action mix mode");
}
}
}

View File

@ -3557,7 +3557,7 @@ bool CustomData_bmesh_merge(const CustomData *source,
totelem = bm->totface;
break;
default: /* should never happen */
BLI_assert(!"invalid type given");
BLI_assert_msg(0, "invalid type given");
iter_type = BM_VERTS_OF_MESH;
totelem = bm->totvert;
break;

View File

@ -1778,7 +1778,7 @@ static bool do_add_image_extension(char *string,
}
}
else {
BLI_assert(!"Unsupported jp2 codec was specified in im_format->jp2_codec");
BLI_assert_msg(0, "Unsupported jp2 codec was specified in im_format->jp2_codec");
}
}
else {
@ -1949,7 +1949,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
im_format->jp2_codec = R_IMF_JP2_CODEC_J2K;
}
else {
BLI_assert(!"Unsupported jp2 codec was specified in file type");
BLI_assert_msg(0, "Unsupported jp2 codec was specified in file type");
}
}
#endif
@ -3017,7 +3017,7 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, const ImageFormatData *imf)
ibuf->foptions.flag |= JP2_J2K;
}
else {
BLI_assert(!"Unsupported jp2 codec was specified in im_format->jp2_codec");
BLI_assert_msg(0, "Unsupported jp2 codec was specified in im_format->jp2_codec");
}
}
#endif

View File

@ -694,7 +694,7 @@ static bool key_pointer_size(const Key *key, const int mode, int *poinsize, int
*poinsize = sizeof(float[KEYELEM_ELEM_SIZE_CURVE]);
break;
default:
BLI_assert(!"invalid 'key->from' ID type");
BLI_assert_msg(0, "invalid 'key->from' ID type");
return false;
}
@ -806,7 +806,7 @@ static void cp_key(const int start,
if (freekref) {
MEM_freeN(freekref);
}
BLI_assert(!"invalid 'cp[1]'");
BLI_assert_msg(0, "invalid 'cp[1]'");
return;
}
@ -984,7 +984,7 @@ static void key_evaluate_relative(const int start,
if (freefrom) {
MEM_freeN(freefrom);
}
BLI_assert(!"invalid 'cp[1]'");
BLI_assert_msg(0, "invalid 'cp[1]'");
return;
}
@ -1204,7 +1204,7 @@ static void do_key(const int start,
if (freek4) {
MEM_freeN(freek4);
}
BLI_assert(!"invalid 'cp[1]'");
BLI_assert_msg(0, "invalid 'cp[1]'");
return;
}
@ -1695,7 +1695,7 @@ void BKE_keyblock_data_set_with_mat4(Key *key,
const float mat[4][4])
{
if (key->elemsize != sizeof(float[3])) {
BLI_assert(!"Invalid elemsize");
BLI_assert_msg(0, "Invalid elemsize");
return;
}

View File

@ -499,7 +499,7 @@ bool BKE_lib_id_make_local(Main *bmain, ID *id, const bool test, const int flags
return false;
}
BLI_assert(!"IDType Missing IDTypeInfo");
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
return false;
}
@ -603,7 +603,7 @@ ID *BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag)
}
}
else {
BLI_assert(!"IDType Missing IDTypeInfo");
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
}
/* Update ID refcount, remap pointers to self in new ID. */
@ -1053,7 +1053,7 @@ void *BKE_libblock_alloc_notest(short type)
if (size != 0) {
return MEM_callocN(size, name);
}
BLI_assert(!"Request to allocate unknown data type");
BLI_assert_msg(0, "Request to allocate unknown data type");
return NULL;
}
@ -1134,7 +1134,7 @@ void BKE_libblock_init_empty(ID *id)
return;
}
BLI_assert(!"IDType Missing IDTypeInfo");
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
}
/* ********** ID session-wise UUID management. ********** */

View File

@ -83,7 +83,7 @@ void BKE_libblock_free_datablock(ID *id, const int UNUSED(flag))
return;
}
BLI_assert(!"IDType Missing IDTypeInfo");
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
}
/**

View File

@ -94,7 +94,7 @@ BLI_INLINE IDOverrideLibrary *lib_override_get(Main *bmain, ID *id)
if (id_type->owner_get != NULL) {
return id_type->owner_get(bmain, id)->override_library;
}
BLI_assert(!"IDTypeInfo of liboverride-embedded ID with no owner getter");
BLI_assert_msg(0, "IDTypeInfo of liboverride-embedded ID with no owner getter");
}
return id->override_library;
}
@ -2126,7 +2126,7 @@ bool BKE_lib_override_library_property_operation_operands_validate(
ATTR_FALLTHROUGH;
case IDOVERRIDE_LIBRARY_OP_MULTIPLY:
if (ptr_storage == NULL || ptr_storage->data == NULL || prop_storage == NULL) {
BLI_assert(!"Missing data to apply differential override operation.");
BLI_assert_msg(0, "Missing data to apply differential override operation.");
return false;
}
ATTR_FALLTHROUGH;
@ -2137,7 +2137,7 @@ bool BKE_lib_override_library_property_operation_operands_validate(
case IDOVERRIDE_LIBRARY_OP_REPLACE:
if ((ptr_dst == NULL || ptr_dst->data == NULL || prop_dst == NULL) ||
(ptr_src == NULL || ptr_src->data == NULL || prop_src == NULL)) {
BLI_assert(!"Missing data to apply override operation.");
BLI_assert_msg(0, "Missing data to apply override operation.");
return false;
}
}

View File

@ -131,7 +131,7 @@ void BKE_lightprobe_type_set(LightProbe *probe, const short lightprobe_type)
probe->attenuation_type = LIGHTPROBE_SHAPE_ELIPSOID;
break;
default:
BLI_assert(!"LightProbe type not configured.");
BLI_assert_msg(0, "LightProbe type not configured.");
break;
}
}

View File

@ -342,7 +342,7 @@ MaskSplinePoint *BKE_mask_spline_point_array_from_point(MaskSpline *spline,
return spline->points_deform;
}
BLI_assert(!"wrong array");
BLI_assert_msg(0, "wrong array");
return NULL;
}
@ -707,7 +707,7 @@ void BKE_mask_point_handle(const MaskSplinePoint *point,
copy_v2_v2(r_handle, bezt->vec[2]);
}
else {
BLI_assert(!"Unknown handle passed to BKE_mask_point_handle");
BLI_assert_msg(0, "Unknown handle passed to BKE_mask_point_handle");
}
}
@ -760,7 +760,7 @@ void BKE_mask_point_set_handle(MaskSplinePoint *point,
copy_v2_v2(bezt->vec[2], loc);
}
else {
BLI_assert(!"unknown handle passed to BKE_mask_point_set_handle");
BLI_assert_msg(0, "unknown handle passed to BKE_mask_point_set_handle");
}
}
@ -1003,7 +1003,7 @@ void BKE_mask_point_select_set_handle(MaskSplinePoint *point,
point->bezt.f3 |= SELECT;
}
else {
BLI_assert(!"Wrong which_handle passed to BKE_mask_point_select_set_handle");
BLI_assert_msg(0, "Wrong which_handle passed to BKE_mask_point_select_set_handle");
}
}
else {
@ -1018,7 +1018,7 @@ void BKE_mask_point_select_set_handle(MaskSplinePoint *point,
point->bezt.f3 &= ~SELECT;
}
else {
BLI_assert(!"Wrong which_handle passed to BKE_mask_point_select_set_handle");
BLI_assert_msg(0, "Wrong which_handle passed to BKE_mask_point_select_set_handle");
}
}
}

View File

@ -53,7 +53,7 @@ BLI_INLINE void BKE_multires_construct_tangent_matrix(float tangent_matrix[3][3]
mul_v3_fl(tangent_matrix[0], -1.0f);
}
else {
BLI_assert(!"Unhandled corner index");
BLI_assert_msg(0, "Unhandled corner index");
}
cross_v3_v3v3(tangent_matrix[2], dPdu, dPdv);
normalize_v3(tangent_matrix[0]);

View File

@ -603,7 +603,7 @@ static void write_loop_in_face_grid(
step_y[1] = 0;
break;
default:
BLI_assert(!"Should never happen");
BLI_assert_msg(0, "Should never happen");
break;
}

View File

@ -399,7 +399,7 @@ static ID *node_owner_get(Main *bmain, ID *id)
}
}
BLI_assert(!"Embedded node tree with no owner. Critical Main inconsistency.");
BLI_assert_msg(0, "Embedded node tree with no owner. Critical Main inconsistency.");
return nullptr;
}

View File

@ -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
}

View File

@ -2798,7 +2798,7 @@ float (*BKE_pbvh_vert_coords_alloc(PBVH *pbvh))[3]
void BKE_pbvh_vert_coords_apply(PBVH *pbvh, const float (*vertCos)[3], const int totvert)
{
if (totvert != pbvh->totvert) {
BLI_assert(!"PBVH: Given deforming vcos number does not natch PBVH vertex number!");
BLI_assert_msg(0, "PBVH: Given deforming vcos number does not natch PBVH vertex number!");
return;
}

View File

@ -367,7 +367,7 @@ static Mesh *rigidbody_get_mesh(Object *ob)
}
/* Just return something sensible so that at least Blender won't crash. */
BLI_assert(!"Unknown mesh source");
BLI_assert_msg(0, "Unknown mesh source");
return BKE_object_get_evaluated_mesh(ob);
}
@ -1814,8 +1814,9 @@ static void rigidbody_update_simulation(Depsgraph *depsgraph,
/* TODO: remove this whole block once we are sure we never get NULL rbo here anymore. */
/* This cannot be done in CoW evaluation context anymore... */
if (rbo == NULL) {
BLI_assert(!"CoW object part of RBW object collection without RB object data, "
"should not happen.\n");
BLI_assert_msg(0,
"CoW object part of RBW object collection without RB object data, "
"should not happen.\n");
/* Since this object is included in the sim group but doesn't have
* rigid body settings (perhaps it was added manually), add!
* - assume object to be active? That is the default for newly added settings...
@ -1871,8 +1872,9 @@ static void rigidbody_update_simulation(Depsgraph *depsgraph,
/* TODO: remove this whole block once we are sure we never get NULL rbo here anymore. */
/* This cannot be done in CoW evaluation context anymore... */
if (rbc == NULL) {
BLI_assert(!"CoW object part of RBW constraints collection without RB constraint data, "
"should not happen.\n");
BLI_assert_msg(0,
"CoW object part of RBW constraints collection without RB constraint data, "
"should not happen.\n");
/* Since this object is included in the group but doesn't have
* constraint settings (perhaps it was added manually), add!
*/

View File

@ -824,7 +824,7 @@ void BKE_sound_set_scene_sound_pan(void *handle, float pan, char animated)
void BKE_sound_update_sequencer(Main *main, bSound *sound)
{
BLI_assert(!"is not supposed to be used, is weird function.");
BLI_assert_msg(0, "is not supposed to be used, is weird function.");
Scene *scene;

View File

@ -68,7 +68,7 @@ eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth(int
case SUBSURF_UV_SMOOTH_ALL:
return SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE;
}
BLI_assert(!"Unknown uv smooth flag");
BLI_assert_msg(0, "Unknown uv smooth flag");
return SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL;
}
@ -81,7 +81,7 @@ eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsu
case SUBSURF_BOUNDARY_SMOOTH_ALL:
return SUBDIV_VTX_BOUNDARY_EDGE_ONLY;
}
BLI_assert(!"Unknown boundary smooth flag");
BLI_assert_msg(0, "Unknown boundary smooth flag");
return SUBDIV_VTX_BOUNDARY_EDGE_ONLY;
}

View File

@ -1509,7 +1509,7 @@ static SubdivCCGCoord coord_step_inside_from_boundary(const SubdivCCG *subdiv_cc
++result.y;
}
else {
BLI_assert(!"non-boundary element given");
BLI_assert_msg(0, "non-boundary element given");
}
return result;
}

View File

@ -44,7 +44,7 @@ int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings(const SubdivSe
case SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER:
return OSD_VTX_BOUNDARY_EDGE_AND_CORNER;
}
BLI_assert(!"Unknown vtx boundary interpolation");
BLI_assert_msg(0, "Unknown vtx boundary interpolation");
return OSD_VTX_BOUNDARY_EDGE_ONLY;
}
@ -65,6 +65,6 @@ int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings(const SubdivSe
case SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL:
return OSD_FVAR_LINEAR_INTERPOLATION_ALL;
}
BLI_assert(!"Unknown fvar linear interpolation");
BLI_assert_msg(0, "Unknown fvar linear interpolation");
return OSD_FVAR_LINEAR_INTERPOLATION_NONE;
}

View File

@ -137,7 +137,7 @@ bool BKE_subdiv_eval_refine_from_mesh(Subdiv *subdiv,
{
if (subdiv->evaluator == NULL) {
/* NOTE: This situation is supposed to be handled by begin(). */
BLI_assert(!"Is not supposed to happen");
BLI_assert_msg(0, "Is not supposed to happen");
return false;
}
/* Set coordinates of base mesh vertices. */

View File

@ -1525,7 +1525,7 @@ MovieTrackingMarker *BKE_tracking_marker_get(MovieTrackingTrack *track, int fram
const int num_markers = track->markersnr;
if (num_markers == 0) {
BLI_assert(!"Detected degenerated track, should never happen.");
BLI_assert_msg(0, "Detected degenerated track, should never happen.");
return NULL;
}

View File

@ -523,7 +523,7 @@ static void distortion_model_parameters_from_options(
/* Libmv returned distortion model which is not known to Blender. This is a logical error in code
* and Blender side is to be updated to match Libmv. */
BLI_assert(!"Unknown distortion model");
BLI_assert_msg(0, "Unknown distortion model");
}
/* Fill in Libmv C-API camera intrinsics options from tracking structure. */

View File

@ -717,7 +717,9 @@ eUndoStepDir BKE_undosys_step_calc_direction(const UndoStack *ustack,
}
}
BLI_assert(!"Target undo step not found, this should not happen and may indicate an undo stack corruption");
BLI_assert_msg(0,
"Target undo step not found, this should not happen and may indicate an undo "
"stack corruption");
return STEP_INVALID;
}

View File

@ -833,7 +833,7 @@ static char *find_next_op(const char *str, char *remaining_str, int len_max)
return remaining_str + i;
}
}
BLI_assert(!"String should be NULL terminated");
BLI_assert_msg(0, "String should be NULL terminated");
return remaining_str + i;
}

View File

@ -106,7 +106,7 @@ void _BLI_assert_unreachable_print(const char *file, const int line, const char
#define BLI_assert_unreachable() \
{ \
_BLI_assert_unreachable_print(__FILE__, __LINE__, __func__); \
BLI_assert(!"This line of code is marked to be unreachable."); \
BLI_assert_msg(0, "This line of code is marked to be unreachable."); \
} \
((void)0)

View File

@ -387,7 +387,7 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
}
}
if (!found) {
BLI_assert(!"Attempt to free data which is not in pool.\n");
BLI_assert_msg(0, "Attempt to free data which is not in pool.\n");
}
}

View File

@ -569,7 +569,7 @@ static int opcode_arg_count(eOpCode code)
case OPCODE_FUNC3:
return 3;
default:
BLI_assert(!"unexpected opcode");
BLI_assert_msg(0, "unexpected opcode");
return -1;
}
}

View File

@ -153,7 +153,7 @@ void rgb_to_ycc(float r, float g, float b, float *r_y, float *r_cb, float *r_cr,
cr = (0.5f * sr) - (0.41869f * sg) - (0.08131f * sb) + 128.0f;
break;
default:
BLI_assert(!"invalid colorspace");
BLI_assert_msg(0, "invalid colorspace");
break;
}

View File

@ -156,7 +156,7 @@ int BLI_task_parallel_thread_id(const TaskParallelTLS *UNUSED(tls))
if (thread_id == -1) {
thread_id = atomic_fetch_and_add_int32(&tbb_thread_id_counter, 1);
if (thread_id >= BLENDER_MAX_THREADS) {
BLI_assert(!"Maximum number of threads exceeded for sculpting");
BLI_assert_msg(0, "Maximum number of threads exceeded for sculpting");
thread_id = thread_id % BLENDER_MAX_THREADS;
}
}

View File

@ -670,7 +670,7 @@ static ARegion *do_versions_find_region(ListBase *regionbase, int regiontype)
{
ARegion *region = do_versions_find_region_or_null(regionbase, regiontype);
if (region == NULL) {
BLI_assert(!"Did not find expected region in versioning");
BLI_assert_msg(0, "Did not find expected region in versioning");
}
return region;
}

View File

@ -304,7 +304,7 @@ static void writedata_do_write(WriteData *wd, const void *mem, size_t memlen)
}
if (memlen > INT_MAX) {
BLI_assert(!"Cannot write chunks bigger than INT_MAX.");
BLI_assert_msg(0, "Cannot write chunks bigger than INT_MAX.");
return;
}
@ -538,7 +538,7 @@ static void writedata(WriteData *wd, int filecode, size_t len, const void *adr)
}
if (len > INT_MAX) {
BLI_assert(!"Cannot write chunks bigger than INT_MAX.");
BLI_assert_msg(0, "Cannot write chunks bigger than INT_MAX.");
return;
}

View File

@ -415,7 +415,7 @@ static void bm_vert_attrs_copy(
BMesh *bm_src, BMesh *bm_dst, const BMVert *v_src, BMVert *v_dst, CustomDataMask mask_exclude)
{
if ((bm_src == bm_dst) && (v_src == v_dst)) {
BLI_assert(!"BMVert: source and target match");
BLI_assert_msg(0, "BMVert: source and target match");
return;
}
if ((mask_exclude & CD_MASK_NORMAL) == 0) {
@ -430,7 +430,7 @@ static void bm_edge_attrs_copy(
BMesh *bm_src, BMesh *bm_dst, const BMEdge *e_src, BMEdge *e_dst, CustomDataMask mask_exclude)
{
if ((bm_src == bm_dst) && (e_src == e_dst)) {
BLI_assert(!"BMEdge: source and target match");
BLI_assert_msg(0, "BMEdge: source and target match");
return;
}
CustomData_bmesh_free_block_data_exclude_by_type(&bm_dst->edata, e_dst->head.data, mask_exclude);
@ -442,7 +442,7 @@ static void bm_loop_attrs_copy(
BMesh *bm_src, BMesh *bm_dst, const BMLoop *l_src, BMLoop *l_dst, CustomDataMask mask_exclude)
{
if ((bm_src == bm_dst) && (l_src == l_dst)) {
BLI_assert(!"BMLoop: source and target match");
BLI_assert_msg(0, "BMLoop: source and target match");
return;
}
CustomData_bmesh_free_block_data_exclude_by_type(&bm_dst->ldata, l_dst->head.data, mask_exclude);
@ -454,7 +454,7 @@ static void bm_face_attrs_copy(
BMesh *bm_src, BMesh *bm_dst, const BMFace *f_src, BMFace *f_dst, CustomDataMask mask_exclude)
{
if ((bm_src == bm_dst) && (f_src == f_dst)) {
BLI_assert(!"BMFace: source and target match");
BLI_assert_msg(0, "BMFace: source and target match");
return;
}
if ((mask_exclude & CD_MASK_NORMAL) == 0) {

View File

@ -740,7 +740,7 @@ void BM_log_entry_drop(BMLogEntry *entry)
bm_log_id_ghash_release(log, entry->added_verts);
}
else {
BLI_assert(!"Cannot drop BMLogEntry from middle");
BLI_assert_msg(0, "Cannot drop BMLogEntry from middle");
}
if (log->current_entry == entry) {

View File

@ -465,7 +465,7 @@ static BMVert **hull_verts_from_bullet(plConvexHull hull,
hull_verts[i] = input_verts[original_index];
}
else {
BLI_assert(!"Unexpected new vertex in hull output");
BLI_assert_msg(0, "Unexpected new vertex in hull output");
}
}

View File

@ -1676,7 +1676,7 @@ static void project_to_edge(const BMEdge *e,
float otherco[3];
if (!isect_line_line_v3(e->v1->co, e->v2->co, co_a, co_b, projco, otherco)) {
#ifdef BEVEL_ASSERT_PROJECT
BLI_assert(!"project meet failure");
BLI_assert_msg(0, "project meet failure");
#endif
copy_v3_v3(projco, e->v1->co);
}
@ -6262,7 +6262,7 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
break;
}
default: {
BLI_assert(!"bad bevel offset kind");
BLI_assert_msg(0, "bad bevel offset kind");
e->offset_l_spec = bp->offset;
break;
}

View File

@ -53,7 +53,7 @@ eExecutionModel CompositorContext::get_execution_model() const
case 0:
return eExecutionModel::Tiled;
default:
BLI_assert(!"Invalid execution mode");
BLI_assert_msg(0, "Invalid execution mode");
}
}
return eExecutionModel::Tiled;

View File

@ -83,7 +83,7 @@ static ConstantOperation *create_constant_operation(DataType data_type, const fl
return value_op;
}
default: {
BLI_assert(!"Non implemented data type");
BLI_assert_msg(0, "Non implemented data type");
return nullptr;
}
}

View File

@ -79,7 +79,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
execution_model_ = new FullFrameExecutionModel(m_context, active_buffers_, m_operations);
break;
default:
BLI_assert(!"Non implemented execution model");
BLI_assert_msg(0, "Non implemented execution model");
break;
}
}

View File

@ -218,7 +218,7 @@ void NodeOperation::get_area_of_interest(NodeOperation *input_op,
return;
}
}
BLI_assert(!"input_op is not an input operation.");
BLI_assert_msg(0, "input_op is not an input operation.");
}
/**

View File

@ -110,7 +110,7 @@ const cl_image_format *OpenCLDevice::determineImageFormat(MemoryBuffer *memoryBu
return &IMAGE_FORMAT_COLOR;
break;
default:
BLI_assert(!"Unsupported num_channels.");
BLI_assert_msg(0, "Unsupported num_channels.");
}
return &IMAGE_FORMAT_COLOR;

View File

@ -107,7 +107,7 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
type = DataType::Value;
break;
default:
BLI_assert(!"Unexpected number of channels for pass");
BLI_assert_msg(0, "Unexpected number of channels for pass");
type = DataType::Value;
break;
}

View File

@ -163,7 +163,7 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
}
else {
expected_element_size = 0;
BLI_assert(!"Something horribly wrong just happened");
BLI_assert_msg(0, "Something horribly wrong just happened");
}
BLI_assert(expected_element_size == actual_element_size);
}

View File

@ -97,7 +97,7 @@ bool DepsgraphBuilder::need_pull_base_into_graph(Base *base)
property_id = AnimatedPropertyID(&object->id, &RNA_Object, "hide_render");
}
else {
BLI_assert(!"Unknown evaluation mode.");
BLI_assert_msg(0, "Unknown evaluation mode.");
return false;
}
return cache_->isPropertyAnimated(&object->id, property_id);

View File

@ -227,7 +227,7 @@ OperationNode *DepsgraphNodeBuilder::add_operation_node(ComponentNode *comp_node
comp_node->identifier().c_str(),
op_node->identifier().c_str(),
op_node);
BLI_assert(!"Should not happen!");
BLI_assert_msg(0, "Should not happen!");
}
return op_node;
}
@ -1601,7 +1601,7 @@ void DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata, bool
break;
}
default:
BLI_assert(!"Should not happen");
BLI_assert_msg(0, "Should not happen");
break;
}
op_node = add_operation_node(obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE);
@ -1780,7 +1780,7 @@ void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree)
build_nodetree(group_ntree);
}
else {
BLI_assert(!"Unknown ID type used for node");
BLI_assert_msg(0, "Unknown ID type used for node");
}
}

View File

@ -326,7 +326,7 @@ void DepsgraphRelationBuilder::add_customdata_mask(Object *object,
IDNode *id_node = graph_->find_id_node(&object->id);
if (id_node == nullptr) {
BLI_assert(!"ID should always be valid");
BLI_assert_msg(0, "ID should always be valid");
}
else {
id_node->customdata_masks |= customdata_masks;
@ -338,7 +338,7 @@ void DepsgraphRelationBuilder::add_special_eval_flag(ID *id, uint32_t flag)
{
IDNode *id_node = graph_->find_id_node(id);
if (id_node == nullptr) {
BLI_assert(!"ID should always be valid");
BLI_assert_msg(0, "ID should always be valid");
}
else {
id_node->eval_flags |= flag;
@ -2342,7 +2342,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
break;
}
default:
BLI_assert(!"Should not happen");
BLI_assert_msg(0, "Should not happen");
break;
}
}
@ -2525,7 +2525,7 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)
add_relation(group_shading_key, shading_key, "Group Node");
}
else {
BLI_assert(!"Unknown ID type used for node");
BLI_assert_msg(0, "Unknown ID type used for node");
}
}

View File

@ -268,7 +268,7 @@ ID *Depsgraph::get_cow_id(const ID *id_orig) const
* - Object or mesh has material at a slot which is not used (for
* example, object has material slot by materials are set to
* object data). */
// BLI_assert(!"Request for non-existing copy-on-write ID");
// BLI_assert_msg(0, "Request for non-existing copy-on-write ID");
}
return (ID *)id_orig;
}

View File

@ -96,7 +96,7 @@ bool DEG_debug_graph_relations_validate(Depsgraph *graph,
DEG_graph_build_from_view_layer(temp_depsgraph);
if (!DEG_debug_compare(temp_depsgraph, graph)) {
fprintf(stderr, "ERROR! Depsgraph wasn't tagged for update when it should have!\n");
BLI_assert(!"This should not happen!");
BLI_assert_msg(0, "This should not happen!");
valid = false;
}
DEG_graph_free(temp_depsgraph);

View File

@ -59,7 +59,7 @@ static ePhysicsRelationType modifier_to_relation_type(unsigned int modifier_type
return DEG_PHYSICS_DYNAMIC_BRUSH;
}
BLI_assert(!"Unknown collision modifier type");
BLI_assert_msg(0, "Unknown collision modifier type");
return DEG_PHYSICS_RELATIONS_NUM;
}
/* Get ID from an ID type object, in a safe manner. This means that object can be nullptr,

View File

@ -238,7 +238,7 @@ void depsgraph_tag_to_component_opcode(const ID *id,
case ID_RECALC_GEOMETRY_ALL_MODES:
case ID_RECALC_ALL:
case ID_RECALC_PSYS_ALL:
BLI_assert(!"Should not happen");
BLI_assert_msg(0, "Should not happen");
break;
case ID_RECALC_TAG_FOR_UNDO:
break; /* Must be ignored by depsgraph. */
@ -457,7 +457,7 @@ const char *update_source_as_string(eUpdateSource source)
case DEG_UPDATE_SOURCE_VISIBILITY:
return "VISIBILITY";
}
BLI_assert(!"Should never happen.");
BLI_assert_msg(0, "Should never happen.");
return "UNKNOWN";
}

View File

@ -223,7 +223,7 @@ bool need_evaluate_operation_at_stage(DepsgraphEvalState *state,
case EvaluationStage::SINGLE_THREADED_WORKAROUND:
return true;
}
BLI_assert(!"Unhandled evaluation stage, should never happen.");
BLI_assert_msg(0, "Unhandled evaluation stage, should never happen.");
return false;
}

View File

@ -899,7 +899,7 @@ ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
done = id_copy_inplace_no_main(id_orig, id_cow);
}
if (!done) {
BLI_assert(!"No idea how to perform CoW on datablock");
BLI_assert_msg(0, "No idea how to perform CoW on datablock");
}
/* Update pointers to nested ID datablocks. */
DEG_COW_PRINT(

View File

@ -48,7 +48,7 @@ const char *nodeClassAsString(NodeClass node_class)
case NodeClass::OPERATION:
return "OPERATION";
}
BLI_assert(!"Unhandled node class, should never happen.");
BLI_assert_msg(0, "Unhandled node class, should never happen.");
return "UNKNOWN";
}
@ -121,7 +121,7 @@ const char *nodeTypeAsString(NodeType type)
case NodeType::NUM_TYPES:
return "SpecialCase";
}
BLI_assert(!"Unhandled node type, should never happen.");
BLI_assert_msg(0, "Unhandled node type, should never happen.");
return "UNKNOWN";
}
@ -177,7 +177,7 @@ eDepsSceneComponentType nodeTypeToSceneComponent(NodeType type)
case NodeType::SIMULATION:
return DEG_SCENE_COMP_PARAMETERS;
}
BLI_assert(!"Unhandled node type, not suppsed to happen.");
BLI_assert_msg(0, "Unhandled node type, not suppsed to happen.");
return DEG_SCENE_COMP_PARAMETERS;
}
@ -253,7 +253,7 @@ eDepsObjectComponentType nodeTypeToObjectComponent(NodeType type)
case NodeType::NUM_TYPES:
return DEG_OB_COMP_PARAMETERS;
}
BLI_assert(!"Unhandled node type, not suppsed to happen.");
BLI_assert_msg(0, "Unhandled node type, not suppsed to happen.");
return DEG_OB_COMP_PARAMETERS;
}

View File

@ -142,7 +142,7 @@ OperationNode *ComponentNode::get_operation(OperationIDKey key) const
"%s: find_operation(%s) failed\n",
this->identifier().c_str(),
key.identifier().c_str());
BLI_assert(!"Request for non-existing operation, should not happen");
BLI_assert_msg(0, "Request for non-existing operation, should not happen");
return nullptr;
}
return node;
@ -190,7 +190,7 @@ OperationNode *ComponentNode::add_operation(const DepsEvalOperationCb &op,
this->identifier().c_str(),
op_node->identifier().c_str(),
op_node);
BLI_assert(!"Should not happen!");
BLI_assert_msg(0, "Should not happen!");
}
/* attach extra data */

View File

@ -53,7 +53,7 @@ const char *linkedStateAsString(eDepsNode_LinkedState_Type linked_state)
case DEG_ID_LINKED_DIRECTLY:
return "DIRECTLY";
}
BLI_assert(!"Unhandled linked state, should never happen.");
BLI_assert_msg(0, "Unhandled linked state, should never happen.");
return "UNKNOWN";
}

View File

@ -211,7 +211,7 @@ const char *operationCodeAsString(OperationCode opcode)
case OperationCode::SIMULATION_EVAL:
return "SIMULATION_EVAL";
}
BLI_assert(!"Unhandled operation code, should never happen.");
BLI_assert_msg(0, "Unhandled operation code, should never happen.");
return "UNKNOWN";
}

View File

@ -481,7 +481,7 @@ static void eevee_render_to_image(void *vedata,
time -= shuttertime;
break;
default:
BLI_assert(!"Invalid motion blur position enum!");
BLI_assert_msg(0, "Invalid motion blur position enum!");
break;
}

View File

@ -117,7 +117,7 @@ static void space_image_gpu_texture_get(Image *image,
const int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(ibuf);
if (sima_flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels == 1))) {
if (ibuf->zbuf) {
BLI_assert(!"Integer based depth buffers not supported");
BLI_assert_msg(0, "Integer based depth buffers not supported");
}
else if (ibuf->zbuf_float) {
*r_gpu_texture = GPU_texture_create_2d(

View File

@ -200,7 +200,7 @@ static void OVERLAY_cache_init(void *vedata)
case CTX_MODE_OBJECT:
break;
default:
BLI_assert(!"Draw mode invalid");
BLI_assert_msg(0, "Draw mode invalid");
break;
}
OVERLAY_antialiasing_cache_init(vedata);

View File

@ -126,7 +126,7 @@ BLI_INLINE void workbench_material_get_image(
break;
}
default:
BLI_assert(!"Node type not supported by workbench");
BLI_assert_msg(0, "Node type not supported by workbench");
}
}
}

View File

@ -1500,7 +1500,7 @@ static void particle_batch_cache_ensure_edit_pos_and_seg(PTCacheEdit *edit,
edit, particle, edit->pathcache, 0, edit->totcached, &elb, &data_step);
}
else {
BLI_assert(!"Hairs are not in edit mode!");
BLI_assert_msg(0, "Hairs are not in edit mode!");
}
hair_cache->indices = GPU_indexbuf_build(&elb);
}

View File

@ -104,7 +104,7 @@ GPUShader *DRW_shader_hair_refine_get(ParticleRefineShader refinement,
sh = hair_refine_shader_transform_feedback_workaround_create(refinement);
break;
default:
BLI_assert(!"Incorrect shader type");
BLI_assert_msg(0, "Incorrect shader type");
}
e_data.hair_refine_sh[refinement] = sh;
}

View File

@ -833,7 +833,7 @@ static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl)
float prevFrameF, nextFrameF;
if (!pose_frame_range_from_object_get(pso, pfl->ob, &prevFrameF, &nextFrameF)) {
BLI_assert(!"Invalid pfl data");
BLI_assert_msg(0, "Invalid pfl data");
return;
}

View File

@ -485,7 +485,7 @@ Nurb *ED_curve_add_nurbs_primitive(
break;
default: /* should never happen */
BLI_assert(!"invalid nurbs type");
BLI_assert_msg(0, "invalid nurbs type");
return NULL;
}

View File

@ -1409,7 +1409,7 @@ static void gpencil_layer_to_curve(bContext *C,
gtd);
break;
default:
BLI_assert(!"invalid mode");
BLI_assert_msg(0, "invalid mode");
break;
}
prev_gps = gps;

View File

@ -689,7 +689,7 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
break;
default:
BLI_assert(!"unhandled select grouped gpencil mode");
BLI_assert_msg(0, "unhandled select grouped gpencil mode");
break;
}

View File

@ -6513,7 +6513,7 @@ static void ui_ndofedit_but_HSVCUBE(uiButHSVCube *hsv_but,
CLAMP(hsv[2], hsv_but->but.softmin, hsv_but->but.softmax);
break;
default:
BLI_assert(!"invalid hsv type");
BLI_assert_msg(0, "invalid hsv type");
break;
}

View File

@ -1500,7 +1500,7 @@ static void icon_draw_rect(float x,
/* sanity check */
if (w <= 0 || h <= 0 || w > 2000 || h > 2000) {
printf("%s: icons are %i x %i pixels?\n", __func__, w, h);
BLI_assert(!"invalid icon size");
BLI_assert_msg(0, "invalid icon size");
return;
}
/* modulate color */

View File

@ -3115,7 +3115,7 @@ void ui_draw_gradient(const rcti *rect,
copy_v3_v3(col1[3], col1[2]);
break;
default:
BLI_assert(!"invalid 'type' argument");
BLI_assert_msg(0, "invalid 'type' argument");
hsv_to_rgb(1.0, 1.0, 1.0, &col1[2][0], &col1[2][1], &col1[2][2]);
copy_v3_v3(col1[0], col1[2]);
copy_v3_v3(col1[1], col1[2]);
@ -5374,7 +5374,7 @@ void ui_draw_menu_item(const uiFontStyle *fstyle,
}
}
else {
BLI_assert(!"Unknwon menu item separator type");
BLI_assert_msg(0, "Unknwon menu item separator type");
}
if (fstyle->kerning == 1) {

View File

@ -160,7 +160,7 @@ static float edge_pan_speed(View2DEdgePanData *vpd,
distance = min - event_loc;
}
else {
BLI_assert(!"Calculating speed outside of pan zones");
BLI_assert_msg(0, "Calculating speed outside of pan zones");
return 0.0f;
}
float distance_factor = distance / (vpd->speed_ramp * U.widget_unit);

View File

@ -390,7 +390,7 @@ static void select_sliding_point(Mask *mask,
point->bezt.f3 |= SELECT;
break;
default:
BLI_assert(!"Unexpected situation in select_sliding_point()");
BLI_assert_msg(0, "Unexpected situation in select_sliding_point()");
}
mask_layer->act_spline = spline;

View File

@ -2022,7 +2022,7 @@ static void single_obdata_users(
break;
default:
printf("ERROR %s: can't copy %s\n", __func__, id->name);
BLI_assert(!"This should never happen.");
BLI_assert_msg(0, "This should never happen.");
/* We need to end the FOREACH_OBJECT_FLAG_BEGIN iterator to prevent memory leak. */
BKE_scene_objects_iterator_end(&iter_macro);

View File

@ -253,7 +253,7 @@ static const char *preview_collection_name(const char pr_type)
case MA_ATMOS:
return "Atmosphere";
default:
BLI_assert(!"Unknown preview type");
BLI_assert_msg(0, "Unknown preview type");
return "";
}
}
@ -335,7 +335,7 @@ static ID *duplicate_ids(ID *id, const bool allow_failure)
return NULL;
default:
if (!allow_failure) {
BLI_assert(!"ID type preview not supported.");
BLI_assert_msg(0, "ID type preview not supported.");
}
return NULL;
}
@ -1469,7 +1469,7 @@ static int icon_previewimg_size_index_get(const IconPreviewSize *icon_size,
}
}
BLI_assert(!"The searched icon size does not match any in the preview image");
BLI_assert_msg(0, "The searched icon size does not match any in the preview image");
return -1;
}

View File

@ -2418,7 +2418,7 @@ static void paste_mtex_copybuf(ID *id)
mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]);
break;
default:
BLI_assert(!"invalid id type");
BLI_assert_msg(0, "invalid id type");
return;
}

View File

@ -3672,7 +3672,7 @@ static void region_visible_rect_calc(ARegion *region, rcti *rect)
/* Skip floating. */
}
else {
BLI_assert(!"Region overlap with unknown alignment");
BLI_assert_msg(0, "Region overlap with unknown alignment");
}
}
}

View File

@ -88,7 +88,7 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_re
r_region_gutter->xmin = r_region_gutter->xmax - category_tabs_width;
}
else {
BLI_assert(!"Unsupported alignment");
BLI_assert_msg(0, "Unsupported alignment");
}
return true;
}

View File

@ -126,7 +126,7 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state,
components = 1;
}
else {
BLI_assert(!"Incompatible format passed to immDrawPixels");
BLI_assert_msg(0, "Incompatible format passed to immDrawPixels");
return;
}
@ -426,7 +426,7 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf,
format = GPU_RGBA16F;
}
else {
BLI_assert(!"Incompatible number of channels for GLSL display");
BLI_assert_msg(0, "Incompatible number of channels for GLSL display");
}
if (format != 0) {

View File

@ -2394,7 +2394,7 @@ static float brush_strength(const Sculpt *sd,
case BRUSH_MASK_SMOOTH:
return alpha * pressure * feather;
}
BLI_assert(!"Not supposed to happen");
BLI_assert_msg(0, "Not supposed to happen");
return 0.0f;
case SCULPT_TOOL_CREASE:

View File

@ -209,7 +209,7 @@ static float *SCULPT_topology_automasking_init(Sculpt *sd, Object *ob, float *au
Brush *brush = BKE_paint_brush(&sd->paint);
if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && !ss->pmap) {
BLI_assert(!"Topology masking: pmap missing");
BLI_assert_msg(0, "Topology masking: pmap missing");
return NULL;
}
@ -248,7 +248,7 @@ static float *sculpt_face_sets_automasking_init(Sculpt *sd, Object *ob, float *a
}
if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && !ss->pmap) {
BLI_assert(!"Face Sets automasking: pmap missing");
BLI_assert_msg(0, "Face Sets automasking: pmap missing");
return NULL;
}
@ -273,7 +273,7 @@ float *SCULPT_boundary_automasking_init(Object *ob,
SculptSession *ss = ob->sculpt;
if (!ss->pmap) {
BLI_assert(!"Boundary Edges masking: pmap missing");
BLI_assert_msg(0, "Boundary Edges masking: pmap missing");
return NULL;
}

View File

@ -367,7 +367,7 @@ void SCULPT_smooth(Sculpt *sd,
last = max_iterations * (bstrength - count * fract);
if (type == PBVH_FACES && !ss->pmap) {
BLI_assert(!"sculpt smooth: pmap missing");
BLI_assert_msg(0, "sculpt smooth: pmap missing");
return;
}

View File

@ -766,7 +766,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
case SCULPT_UNDO_DYNTOPO_BEGIN:
case SCULPT_UNDO_DYNTOPO_END:
case SCULPT_UNDO_DYNTOPO_SYMMETRIZE:
BLI_assert(!"Dynamic topology should've already been handled");
BLI_assert_msg(0, "Dynamic topology should've already been handled");
break;
}
}
@ -1065,7 +1065,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node, Sculpt
case SCULPT_UNDO_DYNTOPO_BEGIN:
case SCULPT_UNDO_DYNTOPO_END:
case SCULPT_UNDO_DYNTOPO_SYMMETRIZE:
BLI_assert(!"Dynamic topology should've already been handled");
BLI_assert_msg(0, "Dynamic topology should've already been handled");
case SCULPT_UNDO_GEOMETRY:
case SCULPT_UNDO_FACE_SETS:
break;
@ -1355,7 +1355,7 @@ SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType
case SCULPT_UNDO_DYNTOPO_BEGIN:
case SCULPT_UNDO_DYNTOPO_END:
case SCULPT_UNDO_DYNTOPO_SYMMETRIZE:
BLI_assert(!"Dynamic topology should've already been handled");
BLI_assert_msg(0, "Dynamic topology should've already been handled");
case SCULPT_UNDO_GEOMETRY:
case SCULPT_UNDO_FACE_SETS:
break;

View File

@ -1025,7 +1025,7 @@ static void prefetch_startjob(void *pjv, short *stop, short *do_update, float *p
progress);
}
else {
BLI_assert(!"Unknown movie clip source when prefetching frames");
BLI_assert_msg(0, "Unknown movie clip source when prefetching frames");
}
}

View File

@ -378,7 +378,7 @@ FileSelectParams *ED_fileselect_ensure_active_params(SpaceFile *sfile)
return &sfile->asset_params->base_params;
}
BLI_assert(!"Invalid browse mode set in file space.");
BLI_assert_msg(0, "Invalid browse mode set in file space.");
return NULL;
}
@ -399,7 +399,7 @@ FileSelectParams *ED_fileselect_get_active_params(const SpaceFile *sfile)
return (FileSelectParams *)sfile->asset_params;
}
BLI_assert(!"Invalid browse mode set in file space.");
BLI_assert_msg(0, "Invalid browse mode set in file space.");
return NULL;
}

View File

@ -592,7 +592,7 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner,
switch (GS(id->name)) {
case ID_LI:
case ID_SCE:
BLI_assert(!"ID type expected to be expanded through new tree-element design");
BLI_assert_msg(0, "ID type expected to be expanded through new tree-element design");
break;
case ID_OB: {
outliner_add_object_contents(space_outliner, te, tselem, (Object *)id);
@ -905,12 +905,13 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
}
else if (type == TSE_SOME_ID) {
if (!te->type) {
BLI_assert(!"Expected this ID type to be ported to new Outliner tree-element design");
BLI_assert_msg(0, "Expected this ID type to be ported to new Outliner tree-element design");
}
}
else if (ELEM(type, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE)) {
if (!te->type) {
BLI_assert(!"Expected override types to be ported to new Outliner tree-element design");
BLI_assert_msg(0,
"Expected override types to be ported to new Outliner tree-element design");
}
}
else {

View File

@ -85,7 +85,7 @@ TreeElementID *TreeElementID::createFromID(TreeElement &legacy_te, ID &id)
return new TreeElementID(legacy_te, id);
/* Deprecated */
case ID_IP:
BLI_assert(!"Outliner trying to build tree-element for deprecated ID type");
BLI_assert_msg(0, "Outliner trying to build tree-element for deprecated ID type");
return nullptr;
}

View File

@ -1556,7 +1556,7 @@ static void *sequencer_OCIO_transform_ibuf(const bContext *C,
*r_format = GPU_RGB16F;
}
else {
BLI_assert(!"Incompatible number of channels for float buffer in sequencer");
BLI_assert_msg(0, "Incompatible number of channels for float buffer in sequencer");
*r_format = GPU_RGBA16F;
display_buffer = NULL;
}

View File

@ -1378,7 +1378,7 @@ static bool view3d_lasso_select(bContext *C,
changed = do_lasso_select_meta(vc, mcoords, mcoords_len, sel_op);
break;
default:
BLI_assert(!"lasso select on incorrect object type");
BLI_assert_msg(0, "lasso select on incorrect object type");
break;
}
@ -3604,7 +3604,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op)
}
break;
default:
BLI_assert(!"box select on incorrect object type");
BLI_assert_msg(0, "box select on incorrect object type");
break;
}
changed_multi |= changed;

View File

@ -910,7 +910,7 @@ void calculateCenterCursor2D(TransInfo *t, float r_center[2])
BKE_mask_coord_from_movieclip(space_clip->clip, &space_clip->user, co, cursor);
}
else {
BLI_assert(!"Shall not happen");
BLI_assert_msg(0, "Shall not happen");
}
r_center[0] = co[0] * t->aspect[0];

View File

@ -107,7 +107,7 @@ static TransDataContainer *edge_slide_container_first_ok(TransInfo *t)
return tc;
}
}
BLI_assert(!"Should never happen, at least one EdgeSlideData should be valid");
BLI_assert_msg(0, "Should never happen, at least one EdgeSlideData should be valid");
return NULL;
}

View File

@ -321,7 +321,7 @@ static int ed_undo_step_by_name(bContext *C, const char *undo_name, ReportList *
/* FIXME: See comments in `ed_undo_step_direction`. */
if (ED_gpencil_session_active()) {
BLI_assert(!"Not implemented currently.");
BLI_assert_msg(0, "Not implemented currently.");
}
wmWindowManager *wm = CTX_wm_manager(C);
@ -369,7 +369,7 @@ static int ed_undo_step_by_index(bContext *C, const int undo_index, ReportList *
/* FIXME: See comments in `ed_undo_step_direction`. */
if (ED_gpencil_session_active()) {
BLI_assert(!"Not implemented currently.");
BLI_assert_msg(0, "Not implemented currently.");
}
wmWindowManager *wm = CTX_wm_manager(C);

View File

@ -41,7 +41,7 @@ int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool
case SEL_OP_XOR:
return (is_select && is_inside) ? 0 : ((!is_select && is_inside) ? 1 : -1);
}
BLI_assert(!"invalid sel_op");
BLI_assert_msg(0, "invalid sel_op");
return -1;
}
/**
@ -67,7 +67,7 @@ int ED_select_op_action_deselected(const eSelectOp sel_op,
case SEL_OP_XOR:
return (is_select && is_inside) ? 0 : ((!is_select && is_inside) ? 1 : -1);
}
BLI_assert(!"invalid sel_op");
BLI_assert_msg(0, "invalid sel_op");
return -1;
}

View File

@ -174,7 +174,7 @@ static const char *gpu_uniform_set_function_from_type(eNodeSocketDatatype type)
case SOCK_RGBA:
return "set_rgba";
default:
BLI_assert(!"No gpu function for non-supported eNodeSocketDatatype");
BLI_assert_msg(0, "No gpu function for non-supported eNodeSocketDatatype");
return NULL;
}
}

View File

@ -154,7 +154,7 @@ void Texture::attach_to(FrameBuffer *fb, GPUAttachmentType type)
return;
}
}
BLI_assert(!"GPU: Error: Texture: Not enough attachment");
BLI_assert_msg(0, "GPU: Error: Texture: Not enough attachment");
}
void Texture::detach_from(FrameBuffer *fb)
@ -166,7 +166,7 @@ void Texture::detach_from(FrameBuffer *fb)
return;
}
}
BLI_assert(!"GPU: Error: Texture: Framebuffer is not attached");
BLI_assert_msg(0, "GPU: Error: Texture: Framebuffer is not attached");
}
void Texture::update(eGPUDataFormat format, const void *data)

View File

@ -114,11 +114,11 @@ static void buffer_from_list_inputs_sort(ListBase *inputs)
if (input->type == GPU_MAT3) {
/* Alignment for mat3 is not handled currently, so not supported */
BLI_assert(!"mat3 not supported in UBO");
BLI_assert_msg(0, "mat3 not supported in UBO");
continue;
}
if (input->type > MAX_UBO_GPU_TYPE) {
BLI_assert(!"GPU type not supported in UBO");
BLI_assert_msg(0, "GPU type not supported in UBO");
continue;
}

Some files were not shown because too many files have changed in this diff Show More