From dfb0c3adcf3308a30ffd8db46e988a09f2eec027 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 11 Oct 2020 10:06:29 -0700 Subject: [PATCH] push some variables' scopes inwards and change an int to a boolean This has no effect on functionality but makes the code a little clearer and less error prone. --- lib/ortho/trapezoid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ortho/trapezoid.c b/lib/ortho/trapezoid.c index 985cd9350..1b555ec53 100644 --- a/lib/ortho/trapezoid.c +++ b/lib/ortho/trapezoid.c @@ -24,6 +24,7 @@ #include #include #include +#include #include /* Node types */ @@ -353,13 +354,14 @@ static void merge_trapezoids (int segnum, int tfirst, int tlast, int side, trap_t* tr, qnode_t* qs) { - int t, tnext, cond; - int ptnext; + int t; /* First merge polys on the LHS */ t = tfirst; while (t > 0 && _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) { + int tnext, ptnext; + boolean cond; if (side == S_LEFT) cond = ((tnext = tr[t].d0) > 0 && tr[tnext].rseg == segnum) || ((tnext = tr[t].d1) > 0 && tr[tnext].rseg == segnum); -- 2.40.0