diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:09:51 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:01 +0300 |
commit | 2a39b34a09702e4e64e27befc97dd6154b75ccc0 (patch) | |
tree | 1a4cfc24b941dee5895b2dbd388c9cc453a31ce3 /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | fd5b093f84845ab7adbe7e6e4dec4bbadbbc16af (diff) |
Cleanup: Editors/Sculpt/Paint, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/sculpt_paint` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 7ac778630ac..e6b0c2fbd1b 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -137,13 +137,11 @@ static float view_angle_limits_apply_falloff(const struct NormalAnglePrecalc *a, /* outsize the normal limit */ return false; } - else if (angle_cos < a->angle_inner__cos) { + if (angle_cos < a->angle_inner__cos) { *mask_p *= (a->angle - acosf(angle_cos)) / a->angle_range; return true; } - else { - return true; - } + return true; } static bool vwpaint_use_normal(const VPaint *vp) @@ -405,12 +403,10 @@ static float wpaint_clamp_monotonic(float oldval, float curval, float newval) if (newval < oldval) { return MIN2(newval, curval); } - else if (newval > oldval) { + if (newval > oldval) { return MAX2(newval, curval); } - else { - return newval; - } + return newval; } static float wpaint_undo_lock_relative( @@ -535,7 +531,7 @@ static bool do_weight_paint_normalize_all_locked(MDeformVert *dvert, return (lock_weight == 1.0f); } - else if (sum_unlock != 0.0f) { + if (sum_unlock != 0.0f) { fac = (1.0f - lock_weight) / sum_unlock; for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { |