From c04088fed1b8faea6b2928bb5e09ab367076950c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 7 Aug 2020 13:37:22 +0200 Subject: 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. --- source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c | 5 ++--- source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c | 2 +- source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/gpencil_modifiers') diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c index f7929b58650..077a454db73 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c @@ -180,9 +180,8 @@ float get_modifier_point_weight(MDeformVert *dvert, bool inverse, int def_nr) if (inverse == 1) { return 1.0f; } - else { - return -1.0f; - } + + return -1.0f; } return weight; diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c index 56d94611b5d..bf6c47b2df5 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c @@ -484,7 +484,7 @@ static void generate_geometry(GpencilModifierData *md, /* Early exit */ return; } - else if (ctime >= end_frame) { + if (ctime >= end_frame) { /* Past End - Animation finished. Display final result. */ if (reverse) { /* 1) Reverse = Start with all, end with nothing. diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c index 10f775ee340..30ac18c64ae 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c @@ -120,7 +120,7 @@ static float gpencil_hook_falloff(const struct GPHookData_cb *tData, const float if (len_sq > tData->falloff_sq) { return 0.0f; } - else if (len_sq > 0.0f) { + if (len_sq > 0.0f) { float fac; if (tData->falloff_type == eGPHook_Falloff_Const) { -- cgit v1.2.3