diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 14:37:22 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 14:38:07 +0300 |
commit | c04088fed1b8faea6b2928bb5e09ab367076950c (patch) | |
tree | f4aed4491f5af44dade7d84a52901a56fd6dddd7 /source/blender/modifiers/intern | |
parent | 3d48d99647b59a6f0461baa4456660917f1bbda6 (diff) |
Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.
No functional changes.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgmix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 02baaa7b830..9821ead2340 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -117,12 +117,11 @@ static float mix_weight(float weight, float weight2, char mix_mode) if (mix_mode == MOD_WVG_MIX_DIF) { return (weight < weight2 ? weight2 - weight : weight - weight2); } - else if (mix_mode == MOD_WVG_MIX_AVG) { + if (mix_mode == MOD_WVG_MIX_AVG) { return (weight + weight2) * 0.5f; } - else { - return weight2; - } + + return weight2; } /************************************** |