diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:01:15 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:01 +0300 |
commit | fd5b093f84845ab7adbe7e6e4dec4bbadbbc16af (patch) | |
tree | 80e57d3d29d38afc67e89c7c6014687f5a749c63 /source/blender/editors/screen/glutil.c | |
parent | 4283da83cc9e307e6e5ce03916bb08a2adb02eba (diff) |
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.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 23 |
1 files changed, 10 insertions, 13 deletions
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 |