Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 13:40:29 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 14:38:06 +0300
commit47f8c444a4d05950d6544f6d09471f808e64b4ab (patch)
treec0765f7e0610d4a14b85c1dbfdbc20f443259680 /source/blender/modifiers/intern/MOD_weightvgmix.c
parentdee359e26e7dd6eb0b51594497d90421801ed877 (diff)
Cleanup: Modifiers, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/modifiers` module. No functional changes.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgmix.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index d1c618df68b..02baaa7b830 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -95,16 +95,16 @@ static float mix_weight(float weight, float weight2, char mix_mode)
if (mix_mode == MOD_WVG_MIX_SET) {
return weight2;
}
- else if (mix_mode == MOD_WVG_MIX_ADD) {
+ if (mix_mode == MOD_WVG_MIX_ADD) {
return (weight + weight2);
}
- else if (mix_mode == MOD_WVG_MIX_SUB) {
+ if (mix_mode == MOD_WVG_MIX_SUB) {
return (weight - weight2);
}
- else if (mix_mode == MOD_WVG_MIX_MUL) {
+ if (mix_mode == MOD_WVG_MIX_MUL) {
return (weight * weight2);
}
- else if (mix_mode == MOD_WVG_MIX_DIV) {
+ if (mix_mode == MOD_WVG_MIX_DIV) {
/* Avoid dividing by zero (or really small values). */
if (weight2 < 0.0f && weight2 > -MOD_WVG_ZEROFLOOR) {
weight2 = -MOD_WVG_ZEROFLOOR;
@@ -114,7 +114,7 @@ static float mix_weight(float weight, float weight2, char mix_mode)
}
return (weight / weight2);
}
- else if (mix_mode == MOD_WVG_MIX_DIF) {
+ if (mix_mode == MOD_WVG_MIX_DIF) {
return (weight < weight2 ? weight2 - weight : weight - weight2);
}
else if (mix_mode == MOD_WVG_MIX_AVG) {