@@ -43,8 +43,9 @@ static void
4343get_facet_vertices (qhT* qh, const facetT* facet, int indices[3 ])
4444{
4545 vertexT *vertex, **vertexp;
46- FOREACHvertex_ (facet->vertices )
46+ FOREACHvertex_ (facet->vertices ) {
4747 *indices++ = qh_pointid (qh, vertex->point );
48+ }
4849}
4950
5051/* Return the indices of the 3 triangles that are neighbors of the specified
@@ -54,8 +55,9 @@ get_facet_neighbours(const facetT* facet, const int* tri_indices,
5455 int indices[3 ])
5556{
5657 facetT *neighbor, **neighborp;
57- FOREACHneighbor_ (facet)
58+ FOREACHneighbor_ (facet) {
5859 *indices++ = (neighbor->upperdelaunay ? -1 : tri_indices[neighbor->id ]);
60+ }
5961}
6062
6163/* Return true if the specified points arrays contain at least 3 unique points,
@@ -74,8 +76,9 @@ at_least_3_unique_points(int npoints, const double* x, const double* y)
7476 for (i = 1 ; i < npoints; ++i) {
7577 if (unique2 == 0 ) {
7678 /* Looking for second unique point. */
77- if (x[i] != x[unique1] || y[i] != y[unique1])
79+ if (x[i] != x[unique1] || y[i] != y[unique1]) {
7880 unique2 = i;
81+ }
7982 }
8083 else {
8184 /* Looking for third unique point. */
@@ -178,8 +181,9 @@ delaunay_impl(int npoints, const double* x, const double* y,
178181 Note that libqhull uses macros to iterate through collections. */
179182 ntri = 0 ;
180183 FORALLfacets {
181- if (!facet->upperdelaunay )
184+ if (!facet->upperdelaunay ) {
182185 ++ntri;
186+ }
183187 }
184188
185189 max_facet_id = qh->facet_id - 1 ;
@@ -222,8 +226,9 @@ delaunay_impl(int npoints, const double* x, const double* y,
222226 *triangles_ptr++ = indices[1 ];
223227 *triangles_ptr++ = (facet->toporient ? indices[2 ] : indices[0 ]);
224228 }
225- else
229+ else {
226230 tri_indices[facet->id ] = -1 ;
231+ }
227232 }
228233
229234 /* Determine neighbors array. */
@@ -239,11 +244,13 @@ delaunay_impl(int npoints, const double* x, const double* y,
239244 /* Clean up. */
240245 qh_freeqhull (qh, !qh_ALL);
241246 qh_memfreeshort (qh, &curlong, &totlong);
242- if (curlong || totlong)
247+ if (curlong || totlong) {
243248 PyErr_WarnEx (PyExc_RuntimeWarning,
244249 " Qhull could not free all allocated memory" , 1 );
245- if (hide_qhull_errors)
250+ }
251+ if (hide_qhull_errors) {
246252 fclose (error_file);
253+ }
247254 free (tri_indices);
248255 free (points);
249256
@@ -259,8 +266,9 @@ delaunay_impl(int npoints, const double* x, const double* y,
259266 qh_freeqhull (qh, !qh_ALL);
260267 qh_memfreeshort (qh, &curlong, &totlong);
261268 /* Don't bother checking curlong and totlong as raising error anyway. */
262- if (hide_qhull_errors)
269+ if (hide_qhull_errors) {
263270 fclose (error_file);
271+ }
264272 free (tri_indices);
265273
266274error_before_qhull:
0 commit comments