]> granicus.if.org Git - graphviz/commitdiff
use a stronger return type for inBetween
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Jun 2021 02:23:52 +0000 (19:23 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Jun 2021 00:09:34 +0000 (17:09 -0700)
lib/pathplan/visibility.c

index f210e70597cfd061e0aa226045257f0f66f68f56..f1c1c18c789cbb87aed1983886fb1e39c45657ab 100644 (file)
@@ -10,6 +10,7 @@
 
 
 #include <pathplan/vis.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
        /* TRANSPARENT means router sees past colinear obstacles */
@@ -68,7 +69,7 @@ int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c)
 /* inBetween:
  * Return true if c is in (a,b), assuming a,b,c are collinear.
  */
-static int inBetween(Ppoint_t a, Ppoint_t b, Ppoint_t c)
+static bool inBetween(Ppoint_t a, Ppoint_t b, Ppoint_t c)
 {
     if (a.x != b.x)            /* not vertical */
        return (a.x < c.x && c.x < b.x) || (b.x < c.x && c.x < a.x);