diff options
Diffstat (limited to 'source/blender')
5 files changed, 12 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c index 050cfd2f355..dcd439e82dc 100644 --- a/source/blender/blenkernel/intern/multires_reshape.c +++ b/source/blender/blenkernel/intern/multires_reshape.c @@ -87,14 +87,12 @@ BLI_INLINE int rotate_quad_to_corner(const float u, const float v, *r_u = 2.0f * (1.0f - u); *r_v = 2.0f * (1.0f - v); } - else if (u <= 0.5f && v >= 0.5f) { + else { + BLI_assert(u <= 0.5f && v >= 0.5f); corner = 3; *r_u = 2.0f * (1.0f - v); *r_v = 2.0f * u; } - else { - BLI_assert(!"Unexpected corner configuration"); - } return corner; } diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index edac9747f68..a386b7bb2d3 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -237,13 +237,11 @@ BLI_INLINE void rotate_corner_to_quad( *r_u = 0.5f + v * 0.5f; *r_v = 0.5f + u * 0.5f; } - else if (corner == 3) { + else { + BLI_assert(corner == 3); *r_u = 0.5f - u * 0.5f; *r_v = 0.5f + v * 0.5f; } - else { - BLI_assert(!"Unexpected corner configuration"); - } } static void subdiv_ccg_eval_regular_grid(CCGEvalGridsData *data, diff --git a/source/blender/blenkernel/intern/subdiv_ccg_mask.c b/source/blender/blenkernel/intern/subdiv_ccg_mask.c index f3a63bb0e9e..27f996a68bb 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg_mask.c +++ b/source/blender/blenkernel/intern/subdiv_ccg_mask.c @@ -93,14 +93,12 @@ BLI_INLINE int rotate_quad_to_corner(const float u, const float v, *r_u = 2.0f * (1.0f - u); *r_v = 2.0f * (1.0f - v); } - else if (u <= 0.5f && v >= 0.5f) { + else { + BLI_assert(u <= 0.5f && v >= 0.5f); corner = 3; *r_u = 2.0f * (1.0f - v); *r_v = 2.0f * u; } - else { - BLI_assert(!"Unexpected corner configuration"); - } return corner; } diff --git a/source/blender/blenkernel/intern/subdiv_displacement_multires.c b/source/blender/blenkernel/intern/subdiv_displacement_multires.c index 5af90160f8e..7d2053129b3 100644 --- a/source/blender/blenkernel/intern/subdiv_displacement_multires.c +++ b/source/blender/blenkernel/intern/subdiv_displacement_multires.c @@ -103,14 +103,12 @@ BLI_INLINE int rotate_quad_to_corner(const float u, const float v, *r_u = 2.0f * (1.0f - u); *r_v = 2.0f * (1.0f - v); } - else if (u <= 0.5f && v >= 0.5f) { + else { + BLI_assert(u <= 0.5f && v >= 0.5f); corner = 3; *r_u = 2.0f * (1.0f - v); *r_v = 2.0f * u; } - else { - BLI_assert(!"Unexpected corner configuration"); - } return corner; } diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index 5e31721ba78..b50e0735083 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -287,7 +287,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) Object *ob = objects[ob_index]; BMEditMesh *em = BKE_editmesh_from_object(ob); BMesh *bm = em->bm; - Material ***material_array; + Material ***material_array = NULL; invert_m4_m4(ob->imat, ob->obmat); int custom_data_offset = 0; @@ -418,10 +418,10 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) BMEditMesh *em = BKE_editmesh_from_object(ob); BMesh *bm = em->bm; bool changed = false; - Material ***material_array; + Material ***material_array = NULL; int custom_data_offset; - bool has_custom_data_layer; + bool has_custom_data_layer = false; switch (type) { case SIMFACE_MATERIAL: { @@ -880,7 +880,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) BMesh *bm = em->bm; bool changed = false; - bool has_custom_data_layer; + bool has_custom_data_layer = false; switch (type) { case SIMEDGE_FREESTYLE: { |