]> granicus.if.org Git - graphviz/commitdiff
neatogen makeObstacle: use a C99 bool for 'isPoly'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:11:15 +0000 (13:11 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:11:15 +0000 (13:11 -0800)
lib/neatogen/neatosplines.c

index b0c9fffd235d255ef94abf61058652abb76a96f3..d771f915a969e839e1ec27eec8436d92299b6c02 100644 (file)
@@ -284,7 +284,7 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin, bool isOrtho)
     boxf b;
     pointf pt;
     field_t *fld;
-    int isPoly;
+    bool isPoly;
     pointf* verts = NULL;
     pointf vs[4];
     pointf p;
@@ -296,7 +296,7 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin, bool isOrtho)
        obs = gv_alloc(sizeof(Ppoly_t));
        poly = ND_shape_info(n);
        if (isOrtho) {
-           isPoly = 1;
+           isPoly = true;
            sides = 4;
            verts = vs;
            margin.x = margin.y = 0;
@@ -324,13 +324,13 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin, bool isOrtho)
            }
        }
        else if (poly->sides >= 3) {
-           isPoly = 1;
+           isPoly = true;
            sides = poly->sides;
            verts = poly->vertices;
            margin.x = pmargin->x;
            margin.y = pmargin->y;
        } else {                /* ellipse */
-           isPoly = 0;
+           isPoly = false;
            sides = 8;
            adj = drand48() * .01;
        }