From: Matthew Fernandez Date: Sun, 11 Oct 2020 16:55:24 +0000 (-0700) Subject: remove some unnecessary bracketing in merge_trapezoids() X-Git-Tag: 2.46.0~20^2^2~12^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a5f0f6d17fe33cab36501c4ae0ff7619396cf6c;p=graphviz remove some unnecessary bracketing in merge_trapezoids() This has no effect on functionality, but makes the resulting code less noisy and easier to read. --- diff --git a/lib/ortho/trapezoid.c b/lib/ortho/trapezoid.c index cb3b60407..985cd9350 100644 --- a/lib/ortho/trapezoid.c +++ b/lib/ortho/trapezoid.c @@ -358,19 +358,19 @@ merge_trapezoids (int segnum, int tfirst, int tlast, int side, trap_t* tr, /* First merge polys on the LHS */ t = tfirst; - while ((t > 0) && _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) + while (t > 0 && _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) { if (side == S_LEFT) - cond = ((((tnext = tr[t].d0) > 0) && (tr[tnext].rseg == segnum)) || - (((tnext = tr[t].d1) > 0) && (tr[tnext].rseg == segnum))); + cond = ((tnext = tr[t].d0) > 0 && tr[tnext].rseg == segnum) || + ((tnext = tr[t].d1) > 0 && tr[tnext].rseg == segnum); else - cond = ((((tnext = tr[t].d0) > 0) && (tr[tnext].lseg == segnum)) || - (((tnext = tr[t].d1) > 0) && (tr[tnext].lseg == segnum))); + cond = ((tnext = tr[t].d0) > 0 && tr[tnext].lseg == segnum) || + ((tnext = tr[t].d1) > 0 && tr[tnext].lseg == segnum); if (cond) { - if ((tr[t].lseg == tr[tnext].lseg) && - (tr[t].rseg == tr[tnext].rseg)) /* good neighbours */ + if (tr[t].lseg == tr[tnext].lseg && + tr[t].rseg == tr[tnext].rseg) /* good neighbours */ { /* merge them */ /* Use the upper node as the new node i.e. t */