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

This commit is contained in:
Campbell Barton 2021-07-22 00:46:45 +10:00
parent 22bef356ae
commit 63da2c4082
3 changed files with 5 additions and 3 deletions

View File

@ -918,7 +918,7 @@ void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt)
}
/* The active keyframe should always be selected. */
BLI_assert(BEZT_ISSEL_ANY(active_bezt) || !"active keyframe must be selected");
BLI_assert_msg(BEZT_ISSEL_ANY(active_bezt), "active keyframe must be selected");
fcu->active_keyframe_index = (int)offset;
}

View File

@ -2340,7 +2340,9 @@ static int file_directory_new_exec(bContext *C, wmOperator *op)
/* If we don't enter the directory directly, remember file to jump into editing. */
if (do_diropen == false) {
BLI_assert(params->rename_id == NULL || !"File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.");
BLI_assert_msg(params->rename_id == NULL,
"File rename handling should immediately clear rename_id when done, "
"because otherwise it will keep taking precedence over renamefile.");
BLI_strncpy(params->renamefile, name, FILE_MAXFILE);
rename_flag = FILE_PARAMS_RENAME_PENDING;
}

View File

@ -538,7 +538,7 @@ static void get_loop_normals(struct Mesh *mesh,
BKE_mesh_calc_normals_split(mesh);
const float(*lnors)[3] = static_cast<float(*)[3]>(CustomData_get_layer(&mesh->ldata, CD_NORMAL));
BLI_assert(lnors != nullptr || !"BKE_mesh_calc_normals_split() should have computed CD_NORMAL");
BLI_assert_msg(lnors != nullptr, "BKE_mesh_calc_normals_split() should have computed CD_NORMAL");
normals.resize(mesh->totloop);