Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-27 05:16:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-27 05:17:30 +0300
commit9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch)
tree0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/convexhull_2d.c
parent337eb8c1de4c57c34520b467d79779153335eecb (diff)
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/convexhull_2d.c')
-rw-r--r--source/blender/blenlib/intern/convexhull_2d.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/convexhull_2d.c b/source/blender/blenlib/intern/convexhull_2d.c
index a59d44037f1..87471ea65a5 100644
--- a/source/blender/blenlib/intern/convexhull_2d.c
+++ b/source/blender/blenlib/intern/convexhull_2d.c
@@ -83,8 +83,10 @@ int BLI_convexhull_2d_sorted(const float (*points)[2], const int n, int r_points
minmax = i - 1;
if (minmax == n - 1) { /* degenerate case: all x-coords == xmin */
r_points[++top] = minmin;
- if (points[minmax][1] != points[minmin][1]) /* a nontrivial segment */
+ if (points[minmax][1] != points[minmin][1]) {
+ /* a nontrivial segment */
r_points[++top] = minmax;
+ }
r_points[++top] = minmin; /* add polygon endpoint */
return top + 1;
}
@@ -168,13 +170,13 @@ static int pointref_cmp_yx(const void *a_, const void *b_)
const struct PointRef *a = a_;
const struct PointRef *b = b_;
- if (a->pt[1] > b->pt[1]) return 1;
- else if (a->pt[1] < b->pt[1]) return -1;
+ if (a->pt[1] > b->pt[1]) { return 1; }
+ else if (a->pt[1] < b->pt[1]) { return -1; }
- if (a->pt[0] > b->pt[0]) return 1;
- else if (a->pt[0] < b->pt[0]) return -1;
+ if (a->pt[0] > b->pt[0]) { return 1; }
+ else if (a->pt[0] < b->pt[0]) { return -1; }
- else return 0;
+ else { return 0; }
}
/**