]> granicus.if.org Git - graphviz/commitdiff
shape_clip0: [nfc] take a C99 bool parameter instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 20:28:48 +0000 (12:28 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 00:14:25 +0000 (16:14 -0800)
lib/common/splines.c

index ea54dd74a93a43cd5cfd697d718ee5c86bd8e3ed..8505aad7936166e0aa2eae81a286f570e9b463f6 100644 (file)
@@ -156,7 +156,7 @@ void bezier_clip(inside_t * inside_context,
  */
 static void
 shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4],
-           boolean left_inside)
+           bool left_inside)
 {
     int i;
     double save_real_size;
@@ -168,8 +168,7 @@ shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4],
        c[i].y = curve[i].y - ND_coord(n).y;
     }
 
-    bezier_clip(inside_context, ND_shape(n)->fns->insidefn, c,
-                left_inside != FALSE);
+    bezier_clip(inside_context, ND_shape(n)->fns->insidefn, c, left_inside);
 
     for (i = 0; i < 4; i++) {
        curve[i].x = c[i].x + ND_coord(n).x;
@@ -207,7 +206,7 @@ void shape_clip(node_t * n, pointf curve[4])
     c.y = curve[0].y - ND_coord(n).y;
     left_inside = ND_shape(n)->fns->insidefn(&inside_context, c);
     ND_rw(n) = save_real_size;
-    shape_clip0(&inside_context, n, curve, left_inside);
+    shape_clip0(&inside_context, n, curve, left_inside != FALSE);
 }
 
 /* new_spline:
@@ -284,7 +283,7 @@ clip_and_install(edge_t * fe, node_t * hn, pointf * ps, int pn,
            if (!ND_shape(tn)->fns->insidefn(&inside_context, p2))
                break;
        }
-       shape_clip0(&inside_context, tn, &ps[start], TRUE);
+       shape_clip0(&inside_context, tn, &ps[start], true);
     } else
        start = 0;
     if(clipHead && ND_shape(hn) && ND_shape(hn)->fns->insidefn) {
@@ -296,7 +295,7 @@ clip_and_install(edge_t * fe, node_t * hn, pointf * ps, int pn,
            if (!ND_shape(hn)->fns->insidefn(&inside_context, p2))
                break;
        }
-       shape_clip0(&inside_context, hn, &ps[end], FALSE);
+       shape_clip0(&inside_context, hn, &ps[end], false);
     } else
        end = pn - 4;
     for (; start < pn - 4; start += 3)