From fd5b093f84845ab7adbe7e6e4dec4bbadbbc16af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 3 Jul 2020 16:01:15 +0200 Subject: Cleanup: Editors/Screen, Clang-Tidy else-after-return fixes This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/screen` module. No functional changes. --- source/blender/editors/screen/glutil.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/screen/glutil.c') diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 8df1172dda1..27e5a53a526 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -495,16 +495,15 @@ float bglPolygonOffsetCalc(const float winmat[16], float viewdist, float dist) UNUSED_VARS(viewdist); #endif } - else { - /* This adjustment effectively results in reducing the Z value by 0.25%. - * - * winmat[14] actually evaluates to `-2 * far * near / (far - near)`, - * is very close to -0.2 with default clip range, - * and is used as the coefficient multiplied by `w / z`, - * thus controlling the z dependent part of the depth value. - */ - return winmat[14] * -0.0025f * dist; - } + + /* This adjustment effectively results in reducing the Z value by 0.25%. + * + * winmat[14] actually evaluates to `-2 * far * near / (far - near)`, + * is very close to -0.2 with default clip range, + * and is used as the coefficient multiplied by `w / z`, + * thus controlling the z dependent part of the depth value. + */ + return winmat[14] * -0.0025f * dist; } /** @@ -752,9 +751,7 @@ int ED_draw_imbuf_method(ImBuf *ibuf) return (size > threshold) ? IMAGE_DRAW_METHOD_2DTEXTURE : IMAGE_DRAW_METHOD_GLSL; } - else { - return U.image_draw_method; - } + return U.image_draw_method; } /* don't move to GPU_immediate_util.h because this uses user-prefs -- cgit v1.2.3