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

index 3ceaf6db68b34d6ee081704974ec4de707c20fa0..ec7b19207c4be90a9d4408a0d1b2e3c644835451 100644 (file)
@@ -157,7 +157,7 @@ static bool intersect(Ppoint_t a, Ppoint_t b, Ppoint_t c, Ppoint_t d)
  * Returns true iff point b is in the cone a0,a1,a2
  * NB: the cone is considered a closed set
  */
-static int in_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b)
+static bool in_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b)
 {
     int m = wind(b, a0, a1);
     int p = wind(b, a1, a2);
@@ -187,7 +187,7 @@ static COORD dist(Ppoint_t a, Ppoint_t b)
     return sqrt(dist2(a, b));
 }
 
-static int inCone(int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[])
+static bool inCone(int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[])
 {
     return in_cone(pts[prevPt[i]], pts[i], pts[nextPt[i]], pts[j]);
 }