diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
commit | a29686eeb3af051a00fbb8a8b9be06bcd050ec8c (patch) | |
tree | 9da60e7257e3e2dafda3e9b565b77c9c6f37675b /source/blender/blenlib/intern/math_color.c | |
parent | e0c51b466f3b23a1fc114690be2b008e19637ea6 (diff) |
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.
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 10 |
1 files changed, 4 insertions, 6 deletions
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]) |