From: Matthew Fernandez Date: Sat, 8 Oct 2022 22:35:42 +0000 (-0700) Subject: common: remove unnecessary parens X-Git-Tag: 7.0.0~15^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e53479bf45193d6ab700148f46c6a45072d9a42c;p=graphviz common: remove unnecessary parens --- diff --git a/lib/common/arrows.c b/lib/common/arrows.c index 9012bff15..4cdbf8684 100644 --- a/lib/common/arrows.c +++ b/lib/common/arrows.c @@ -190,9 +190,9 @@ static void arrow_match_name(char *name, int *flag) agerr(AGWARN, "Arrow type \"%s\" unknown - ignoring\n", next); return; } - if (f == ARR_TYPE_GAP && i == (NUMB_OF_ARROW_HEADS -1)) + if (f == ARR_TYPE_GAP && i == NUMB_OF_ARROW_HEADS - 1) f = ARR_TYPE_NONE; - if ((f == ARR_TYPE_GAP) && (i == 0) && (*rest == '\0')) + if (f == ARR_TYPE_GAP && i == 0 && *rest == '\0') f = ARR_TYPE_NONE; if (f != ARR_TYPE_NONE) *flag |= (f << (i++ * BITS_PER_ARROW)); @@ -343,7 +343,7 @@ void arrowOrthoClip(edge_t* e, pointf* ps, int startp, int endp, bezier* spl, in pointf p, q, r, s, t; double d, tlen, hlen, maxd; - if (sflag && eflag && (endp == startp)) { /* handle special case of two arrows on a single segment */ + if (sflag && eflag && endp == startp) { /* handle special case of two arrows on a single segment */ p = ps[endp]; q = ps[endp+3]; tlen = arrow_length (e, sflag); @@ -577,7 +577,7 @@ static pointf arrow_type_crow(GVJ_t * job, pointf p, pointf u, double arrowsize, double arrowwidth, shaftwidth; arrowwidth = 0.45; - if (penwidth > (4 * arrowsize) && (flag & ARR_MOD_INV)) + if (penwidth > 4 * arrowsize && (flag & ARR_MOD_INV)) arrowwidth *= penwidth / (4 * arrowsize); shaftwidth = 0; @@ -836,7 +836,7 @@ static pointf arrow_gen_type(GVJ_t * job, pointf p, pointf u, double arrowsize, if (f == arrowtype->type) { u.x *= arrowtype->lenfact * arrowsize; u.y *= arrowtype->lenfact * arrowsize; - p = (arrowtype->gen) (job, p, u, arrowsize, penwidth, flag); + p = arrowtype->gen(job, p, u, arrowsize, penwidth, flag); break; } }