diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:01:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:28:17 +0300 |
commit | 14b2a35c8bfd6d77f6357f929ddd82845436725f (patch) | |
tree | 54746d6a3cf0da24b95d2a9761e6222656eb5249 /source/blender/freestyle | |
parent | 17a2820da8ad8ea23d336129f32e060e5746b047 (diff) |
Cleanup: use parenthesis for if statements in macros
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r-- | source/blender/freestyle/intern/geometry/GeomUtils.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp index 89a89d095ea..925bc3c9f94 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp +++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp @@ -219,14 +219,18 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, #define FINDMINMAX(x0, x1, x2, min, max) \ { \ min = max = x0; \ - if (x1 < min) \ + if (x1 < min) { \ min = x1; \ - if (x1 > max) \ + } \ + if (x1 > max) { \ max = x1; \ - if (x2 < min) \ + } \ + if (x2 < min) { \ min = x2; \ - if (x2 > max) \ + } \ + if (x2 > max) { \ max = x2; \ + } \ } \ (void)0 @@ -244,8 +248,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p0; \ } \ rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 @@ -262,8 +267,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p0; \ } \ rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 @@ -281,8 +287,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p0; \ } \ rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 @@ -299,8 +306,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p0; \ } \ rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 @@ -318,8 +326,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p2; \ } \ rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 @@ -336,8 +345,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, max = p0; \ } \ rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \ - if (min > rad || max < -rad) \ + if (min > rad || max < -rad) { \ return 0; \ + } \ } \ (void)0 |