From: Matthew Fernandez Date: Sun, 6 Jun 2021 02:31:52 +0000 (-0700) Subject: use a stronger return type for clear X-Git-Tag: 2.47.3~9^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96bd99ffe11a769160d761e096ebbe84bdad2d4b;p=graphviz use a stronger return type for clear --- diff --git a/lib/pathplan/visibility.c b/lib/pathplan/visibility.c index ec7b19207..896b77e4c 100644 --- a/lib/pathplan/visibility.c +++ b/lib/pathplan/visibility.c @@ -196,7 +196,7 @@ static bool inCone(int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[]) * Return true if no polygon line segment non-trivially intersects * the segment [pti,ptj], ignoring segments in [start,end). */ -static int clear(Ppoint_t pti, Ppoint_t ptj, +static bool clear(Ppoint_t pti, Ppoint_t ptj, int start, int end, int V, Ppoint_t pts[], int nextPt[], int prevPt[]) { @@ -204,13 +204,13 @@ static int clear(Ppoint_t pti, Ppoint_t ptj, for (k = 0; k < start; k++) { if (INTERSECT(pti, ptj, pts[k], pts[nextPt[k]], pts[prevPt[k]])) - return 0; + return false; } for (k = end; k < V; k++) { if (INTERSECT(pti, ptj, pts[k], pts[nextPt[k]], pts[prevPt[k]])) - return 0; + return false; } - return 1; + return true; } /* compVis: