From a29686eeb3af051a00fbb8a8b9be06bcd050ec8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 7 Aug 2020 11:23:02 +0200 Subject: Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete) This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes. --- source/blender/blenlib/intern/math_color.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib/intern/math_color.c') diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 651a062e3d5..09bb7ea5711 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -439,9 +439,8 @@ float srgb_to_linearrgb(float c) if (c < 0.04045f) { return (c < 0.0f) ? 0.0f : c * (1.0f / 12.92f); } - else { - return powf((c + 0.055f) * (1.0f / 1.055f), 2.4f); - } + + return powf((c + 0.055f) * (1.0f / 1.055f), 2.4f); } float linearrgb_to_srgb(float c) @@ -449,9 +448,8 @@ float linearrgb_to_srgb(float c) if (c < 0.0031308f) { return (c < 0.0f) ? 0.0f : c * 12.92f; } - else { - return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f; - } + + return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f; } void minmax_rgb(short c[3]) -- cgit v1.2.3