From aba4e6810f8b4d0e459137b64e061a2cadc457d1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 31 May 2019 23:21:16 +1000 Subject: Cleanup: style, use braces in source/ (include disabled blocks) --- source/blender/blenlib/intern/math_base_inline.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib/intern/math_base_inline.c') diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 221a27f69ed..8f30255a08b 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -230,23 +230,29 @@ MINLINE unsigned power_of_2_min_u(unsigned x) #define _round_clamp_fl_impl(arg, ty, min, max) \ { \ float r = floorf(arg + 0.5f); \ - if (UNLIKELY(r <= (float)min)) \ + if (UNLIKELY(r <= (float)min)) { \ return (ty)min; \ - else if (UNLIKELY(r >= (float)max)) \ + } \ + else if (UNLIKELY(r >= (float)max)) { \ return (ty)max; \ - else \ + } \ + else { \ return (ty)r; \ + } \ } #define _round_clamp_db_impl(arg, ty, min, max) \ { \ double r = floor(arg + 0.5); \ - if (UNLIKELY(r <= (double)min)) \ + if (UNLIKELY(r <= (double)min)) { \ return (ty)min; \ - else if (UNLIKELY(r >= (double)max)) \ + } \ + else if (UNLIKELY(r >= (double)max)) { \ return (ty)max; \ - else \ + } \ + else { \ return (ty)r; \ + } \ } #define _round_fl_impl(arg, ty) \ -- cgit v1.2.3