]> granicus.if.org Git - graphviz/commitdiff
ortho add_segment: use C99 bools for some boolean locals
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 24 Nov 2022 18:56:05 +0000 (10:56 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Nov 2022 04:15:50 +0000 (20:15 -0800)
lib/ortho/trapezoid.c

index d5ff19f9b443289bc9591dc8dd8e0233a49e299a..0e6fa0e3649e6a0ba5e31bfdba81a28a5ba13461 100644 (file)
@@ -811,15 +811,16 @@ static int add_segment(int segnum, segment_t *seg, traps_t *tr, qnodes_t *qs) {
        {
          double y0, yt;
          pointf tmppt;
-         int tnext, i_d0, i_d1;
+         int tnext;
+         bool i_d0, i_d1;
 
-         i_d0 = i_d1 = FALSE;
+         i_d0 = i_d1 = false;
          if (FP_EQUAL(tr->data[t].lo.y, s.v0.y))
            {
              if (tr->data[t].lo.x > s.v0.x)
-               i_d0 = TRUE;
+               i_d0 = true;
              else
-               i_d1 = TRUE;
+               i_d1 = true;
            }
          else
            {
@@ -828,9 +829,9 @@ static int add_segment(int segnum, segment_t *seg, traps_t *tr, qnodes_t *qs) {
              tmppt.x = s.v0.x + yt * (s.v1.x - s.v0.x);
 
              if (_less_than(&tmppt, &tr->data[t].lo))
-               i_d0 = TRUE;
+               i_d0 = true;
              else
-               i_d1 = TRUE;
+               i_d1 = true;
            }
 
          /* check continuity from the top so that the lower-neighbour */