diff options
Diffstat (limited to 'source/blender/blenkernel')
4 files changed, 8 insertions, 16 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; } |