Cleanup: use new BLI_assert_unreachable macro
This commit is contained in:
@@ -664,7 +664,7 @@ bool BKE_appdir_folder_id_ex(const int folder_id,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,7 +719,7 @@ const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *su
|
|||||||
get_path_user_ex(path, sizeof(path), "scripts", subfolder, version, check_is_dir);
|
get_path_user_ex(path, sizeof(path), "scripts", subfolder, version, check_is_dir);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1691,7 +1691,7 @@ void BKE_bone_parent_transform_calc_from_matrices(int bone_flag,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If removing parent pose rotation: */
|
/* If removing parent pose rotation: */
|
||||||
@@ -1723,7 +1723,7 @@ void BKE_bone_parent_transform_calc_from_matrices(int bone_flag,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1374,7 +1374,7 @@ void BKE_histogram_update_sample_line(Histogram *hist,
|
|||||||
rgba[3] = 1.0f;
|
rgba[3] = 1.0f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
hist->data_luma[i] = IMB_colormanagement_get_luminance(rgba);
|
hist->data_luma[i] = IMB_colormanagement_get_luminance(rgba);
|
||||||
@@ -1476,7 +1476,7 @@ static void scopes_update_cb(void *__restrict userdata,
|
|||||||
rgba[3] = 1.0f;
|
rgba[3] = 1.0f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -936,7 +936,7 @@ static void update_velocities(FluidEffectorSettings *fes,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Should never reach this block. */
|
/* Should never reach this block. */
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -182,7 +182,7 @@ void BKE_main_free(Main *mainvar)
|
|||||||
BKE_id_free_ex(mainvar, id, free_flag, false);
|
BKE_id_free_ex(mainvar, id, free_flag, false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -148,7 +148,7 @@ bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3])
|
|||||||
case ME_WRAPPER_TYPE_MDATA:
|
case ME_WRAPPER_TYPE_MDATA:
|
||||||
return BKE_mesh_minmax(me, min, max);
|
return BKE_mesh_minmax(me, min, max);
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ void BKE_mesh_wrapper_vert_coords_copy(const Mesh *me,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me,
|
void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me,
|
||||||
@@ -226,7 +226,7 @@ void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
@@ -243,7 +243,7 @@ int BKE_mesh_wrapper_vert_len(const Mesh *me)
|
|||||||
case ME_WRAPPER_TYPE_MDATA:
|
case ME_WRAPPER_TYPE_MDATA:
|
||||||
return me->totvert;
|
return me->totvert;
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ int BKE_mesh_wrapper_edge_len(const Mesh *me)
|
|||||||
case ME_WRAPPER_TYPE_MDATA:
|
case ME_WRAPPER_TYPE_MDATA:
|
||||||
return me->totedge;
|
return me->totedge;
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ int BKE_mesh_wrapper_loop_len(const Mesh *me)
|
|||||||
case ME_WRAPPER_TYPE_MDATA:
|
case ME_WRAPPER_TYPE_MDATA:
|
||||||
return me->totloop;
|
return me->totloop;
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ int BKE_mesh_wrapper_poly_len(const Mesh *me)
|
|||||||
case ME_WRAPPER_TYPE_MDATA:
|
case ME_WRAPPER_TYPE_MDATA:
|
||||||
return me->totpoly;
|
return me->totpoly;
|
||||||
}
|
}
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1858,7 +1858,7 @@ bool BKE_object_data_is_in_editmode(const ID *id)
|
|||||||
case ID_AR:
|
case ID_AR:
|
||||||
return ((const bArmature *)id)->edbo != NULL;
|
return ((const bArmature *)id)->edbo != NULL;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1905,7 +1905,7 @@ char *BKE_object_data_editmode_flush_ptr_get(struct ID *id)
|
|||||||
return &arm->needs_flush_to_id;
|
return &arm->needs_flush_to_id;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -656,7 +656,7 @@ void BKE_paint_runtime_init(const ToolSettings *ts, Paint *paint)
|
|||||||
paint->runtime.ob_mode = OB_MODE_WEIGHT_GPENCIL;
|
paint->runtime.ob_mode = OB_MODE_WEIGHT_GPENCIL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ void ED_editors_init(bContext *C)
|
|||||||
ED_object_wpaintmode_enter_ex(bmain, depsgraph, scene, ob);
|
ED_object_wpaintmode_enter_ex(bmain, depsgraph, scene, ob);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -94,7 +94,7 @@ int ED_select_similar_compare_float(const float delta, const float thresh, const
|
|||||||
case SIM_CMP_LT:
|
case SIM_CMP_LT:
|
||||||
return ((delta - thresh) < FLT_EPSILON);
|
return ((delta - thresh) < FLT_EPSILON);
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ bool ED_select_similar_compare_float_tree(const KDTree_1d *tree,
|
|||||||
nearest_edge_length = FLT_MAX;
|
nearest_edge_length = FLT_MAX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -169,7 +169,7 @@ static BMLoop *bm_loop_find_other_fan_loop_with_visible_face(BMLoop *l_src,
|
|||||||
l_other = l_other->prev;
|
l_other = l_other->prev;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return l_other;
|
return l_other;
|
||||||
@@ -189,7 +189,7 @@ static BMLoop *bm_vert_step_fan_loop_uv(BMLoop *l, BMEdge **e_step, const int cd
|
|||||||
l_next = l;
|
l_next = l;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2213,7 +2213,7 @@ static int uv_mouse_select_loop_generic_multi(bContext *C,
|
|||||||
flush = uv_select_edgering(sima, scene, obedit, &hit, extend);
|
flush = uv_select_edgering(sima, scene, obedit, &hit, extend);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
if (ts->uv_flag & UV_SYNC_SELECTION) {
|
||||||
|
@@ -393,7 +393,7 @@ static ImBuf *thumb_create_ex(const char *file_path,
|
|||||||
img = IMB_thumb_load_font(file_path, tsize, tsize);
|
img = IMB_thumb_load_font(file_path, tsize, tsize);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0); /* This should never happen */
|
BLI_assert_unreachable(); /* This should never happen */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ void IMB_thumb_path_unlock(const char *path)
|
|||||||
|
|
||||||
if (thumb_locks.locked_paths) {
|
if (thumb_locks.locked_paths) {
|
||||||
if (!BLI_gset_remove(thumb_locks.locked_paths, key, MEM_freeN)) {
|
if (!BLI_gset_remove(thumb_locks.locked_paths, key, MEM_freeN)) {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
BLI_condition_notify_all(&thumb_locks.cond);
|
BLI_condition_notify_all(&thumb_locks.cond);
|
||||||
}
|
}
|
||||||
|
@@ -3984,7 +3984,7 @@ PyObject *BPy_BMElem_CreatePyObject(BMesh *bm, BMHeader *ele)
|
|||||||
case BM_LOOP:
|
case BM_LOOP:
|
||||||
return BPy_BMLoop_CreatePyObject(bm, (BMLoop *)ele);
|
return BPy_BMLoop_CreatePyObject(bm, (BMLoop *)ele);
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
PyErr_SetString(PyExc_SystemError, "internal error");
|
PyErr_SetString(PyExc_SystemError, "internal error");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ static CustomData *bpy_bm_customdata_get(BMesh *bm, char htype)
|
|||||||
return &bm->ldata;
|
return &bm->ldata;
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,7 +958,7 @@ PyObject *BPy_BMLayerAccess_CreatePyObject(BMesh *bm, const char htype)
|
|||||||
type = &BPy_BMLayerAccessLoop_Type;
|
type = &BPy_BMLayerAccessLoop_Type;
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
type = NULL;
|
type = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -123,7 +123,7 @@ static PyObject *py_imbuf_resize(Py_ImBuf *self, PyObject *args, PyObject *kw)
|
|||||||
IMB_scaleImBuf(self->ibuf, UNPACK2(size));
|
IMB_scaleImBuf(self->ibuf, UNPACK2(size));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
@@ -201,7 +201,7 @@ static PyObject *pygpu_matrix_stack_context_enter(BPyGPU_MatrixStackContext *sel
|
|||||||
self->level = GPU_matrix_stack_level_get_projection();
|
self->level = GPU_matrix_stack_level_get_projection();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ static PyObject *pygpu_matrix_stack_context_exit(BPyGPU_MatrixStackContext *self
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
finally:
|
finally:
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
@@ -70,7 +70,8 @@
|
|||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
default: \
|
default: \
|
||||||
BLI_assert(0); \
|
BLI_assert_unreachable(); \
|
||||||
|
break; \
|
||||||
} \
|
} \
|
||||||
((void)0)
|
((void)0)
|
||||||
|
|
||||||
|
@@ -1345,7 +1345,7 @@ BLI_bitmap *pyrna_set_to_enum_bitmap(const EnumPropertyItem *items,
|
|||||||
index = (int)ret_convert.as_unsigned;
|
index = (int)ret_convert.as_unsigned;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLI_assert(index < bitmap_size);
|
BLI_assert(index < bitmap_size);
|
||||||
@@ -5550,7 +5550,7 @@ static PyObject *pyprop_array_foreach_getset(BPy_PropertyArrayRNA *self,
|
|||||||
case PROP_POINTER:
|
case PROP_POINTER:
|
||||||
case PROP_COLLECTION:
|
case PROP_COLLECTION:
|
||||||
/* Should never happen. */
|
/* Should never happen. */
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5595,7 +5595,7 @@ static PyObject *pyprop_array_foreach_getset(BPy_PropertyArrayRNA *self,
|
|||||||
case PROP_POINTER:
|
case PROP_POINTER:
|
||||||
case PROP_COLLECTION:
|
case PROP_COLLECTION:
|
||||||
/* Should never happen. */
|
/* Should never happen. */
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1049,7 +1049,8 @@ static void adjoint_matrix_n(float *mat_dst, const float *mat_src, const ushort
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,7 +1160,7 @@ static void matrix_invert_safe_internal(const MatrixObject *self, float *r_mat)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -488,7 +488,7 @@ static Sequence *seq_dupli(const Scene *scene_src,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* sequence type not handled in duplicate! Expect a crash now... */
|
/* sequence type not handled in duplicate! Expect a crash now... */
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When using SEQ_DUPE_UNIQUE_NAME, it is mandatory to add new sequences in relevant container
|
/* When using SEQ_DUPE_UNIQUE_NAME, it is mandatory to add new sequences in relevant container
|
||||||
|
@@ -324,7 +324,7 @@ bool wm_gizmogroup_is_visible_in_drawstep(const wmGizmoGroup *gzgroup,
|
|||||||
case WM_GIZMOMAP_DRAWSTEP_3D:
|
case WM_GIZMOMAP_DRAWSTEP_3D:
|
||||||
return (gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D);
|
return (gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D);
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,7 +393,7 @@ static int gizmo_select_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
|
|||||||
return OPERATOR_FINISHED;
|
return OPERATOR_FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,7 +498,7 @@ static int gizmo_tweak_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||||||
bool clear_modal = true;
|
bool clear_modal = true;
|
||||||
|
|
||||||
if (gz == NULL) {
|
if (gz == NULL) {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,7 +585,7 @@ static int gizmo_tweak_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
|||||||
|
|
||||||
if (!gz) {
|
if (!gz) {
|
||||||
/* wm_handlers_do_intern shouldn't let this happen */
|
/* wm_handlers_do_intern shouldn't let this happen */
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -941,7 +941,7 @@ bool WM_gizmomap_select_all(bContext *C, wmGizmoMap *gzmap, const int action)
|
|||||||
changed = wm_gizmomap_deselect_all(gzmap);
|
changed = wm_gizmomap_deselect_all(gzmap);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -144,7 +144,7 @@ wmEvent *wm_event_add(wmWindow *win, const wmEvent *event_to_add)
|
|||||||
wmEvent *WM_event_add_simulate(wmWindow *win, const wmEvent *event_to_add)
|
wmEvent *WM_event_add_simulate(wmWindow *win, const wmEvent *event_to_add)
|
||||||
{
|
{
|
||||||
if ((G.f & G_FLAG_EVENT_SIMULATE) == 0) {
|
if ((G.f & G_FLAG_EVENT_SIMULATE) == 0) {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
wmEvent *event = wm_event_add(win, event_to_add);
|
wmEvent *event = wm_event_add(win, event_to_add);
|
||||||
@@ -1037,7 +1037,7 @@ static void wm_operator_finished(bContext *C, wmOperator *op, const bool repeat,
|
|||||||
ED_area_type_hud_clear(wm, NULL);
|
ED_area_type_hud_clear(wm, NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2885,7 +2885,7 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Unreachable (handle all types above). */
|
/* Unreachable (handle all types above). */
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action & WM_HANDLER_BREAK) {
|
if (action & WM_HANDLER_BREAK) {
|
||||||
|
@@ -2298,7 +2298,7 @@ static int operator_state_dispatch(bContext *C, wmOperator *op, OperatorDispatch
|
|||||||
return target.run(C, op);
|
return target.run(C, op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLI_assert(false);
|
BLI_assert_unreachable();
|
||||||
return OPERATOR_CANCELLED;
|
return OPERATOR_CANCELLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -750,7 +750,7 @@ static void lib_relocate_do_remap(Main *bmain,
|
|||||||
/* In some cases, new_id might become direct link, remove parent of library in this case. */
|
/* In some cases, new_id might become direct link, remove parent of library in this case. */
|
||||||
if (new_id->lib->parent && (new_id->tag & LIB_TAG_INDIRECT) == 0) {
|
if (new_id->lib->parent && (new_id->tag & LIB_TAG_INDIRECT) == 0) {
|
||||||
if (do_reload) {
|
if (do_reload) {
|
||||||
BLI_assert(0); /* Should not happen in 'pure' reload case... */
|
BLI_assert_unreachable(); /* Should not happen in 'pure' reload case... */
|
||||||
}
|
}
|
||||||
new_id->lib->parent = NULL;
|
new_id->lib->parent = NULL;
|
||||||
}
|
}
|
||||||
|
@@ -1229,7 +1229,7 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i
|
|||||||
id = (ID *)BKE_image_load_exists_ex(bmain, path, &exists);
|
id = (ID *)BKE_image_load_exists_ex(bmain, path, &exists);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
@@ -1248,7 +1248,7 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i
|
|||||||
BLI_path_rel(((Image *)id)->filepath, BKE_main_blendfile_path(bmain));
|
BLI_path_rel(((Image *)id)->filepath, BKE_main_blendfile_path(bmain));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1687,7 +1687,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *region, void *userdat
|
|||||||
UI_but_func_menu_search(but);
|
UI_but_func_menu_search(but);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
UI_but_flag_enable(but, UI_BUT_ACTIVATE_ON_INIT);
|
UI_but_flag_enable(but, UI_BUT_ACTIVATE_ON_INIT);
|
||||||
|
@@ -2174,7 +2174,7 @@ void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)
|
|||||||
screen_rect.ymin += height;
|
screen_rect.ymin += height;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BLI_assert(0);
|
BLI_assert_unreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user