From bd81e9a50a3ce7f3cf49e7750cf48ab7071a62e8 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 31 May 2021 09:20:41 -0700 Subject: [PATCH] abbreviate open coded fmax/fmin in limitBoxes --- lib/common/routespl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 6c6f6846b..295461d80 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -346,10 +346,8 @@ limitBoxes (boxf* boxes, int boxn, const pointf *pps, int pn, int delta) * or graphs/directed/records.gv fails */ #define FUDGE .0001 if (sp[0].y <= boxes[bi].UR.y+FUDGE && sp[0].y >= boxes[bi].LL.y-FUDGE) { - if (boxes[bi].LL.x > sp[0].x) - boxes[bi].LL.x = sp[0].x; - if (boxes[bi].UR.x < sp[0].x) - boxes[bi].UR.x = sp[0].x; + boxes[bi].LL.x = fmin(boxes[bi].LL.x, sp[0].x); + boxes[bi].UR.x = fmax(boxes[bi].UR.x, sp[0].x); } } } -- 2.50.1