]> granicus.if.org Git - graphviz/commitdiff
use a C99 bool return type for init_query_structure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Apr 2021 23:22:26 +0000 (16:22 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 01:35:43 +0000 (18:35 -0700)
Now that we compile with C99, there's no need to use the internal boolean type
for things like this.

lib/ortho/trapezoid.c

index 1e63675182961c417c2e6eab662e27de879a7424..fec72a24883ef226cbcf3d66d886da59dafa1955 100644 (file)
@@ -217,7 +217,7 @@ init_query_structure(int segnum, segment_t* seg, trap_t* tr, qnode_t* qs)
  * segnum. Takes care of the degenerate cases when both the vertices
  * have the same y--cood, etc.
  */
-static int
+static bool
 is_left_of (int segnum, segment_t* seg, pointf *v)
 {
   segment_t *s = &seg[segnum];
@@ -262,10 +262,7 @@ is_left_of (int segnum, segment_t* seg, pointf *v)
        area = CROSS(s->v1, s->v0, (*v));
     }
 
-  if (area > 0.0)
-    return TRUE;
-  else
-    return FALSE;
+  return area > 0.0;
 }
 
 /* Returns true if the corresponding endpoint of the given segment is */