From f0e187dcb4524774da96d983930d3e4c8978694f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 26 Dec 2022 13:35:34 -0800 Subject: [PATCH] ortho emitGraph: do float rounding in 'fprintf' Squashes four -Wfloat-conversion warnings. --- lib/ortho/ortho.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 263cc1bb2..db1554e3f 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -1411,7 +1411,7 @@ static char* prolog2 = static char* epilog2 = "showpage\n\ %%%%Trailer\n\ -%%%%BoundingBox: %d %d %d %d\n"; +%%%%BoundingBox: %.f %.f %.f %.f\n"; static point coordOf (cell* cp, snode* np) @@ -1536,7 +1536,6 @@ static DEBUG_FN void emitSearchGraph(FILE *fp, sgraph *sg) { static DEBUG_FN void emitGraph(FILE *fp, maze *mp, size_t n_edges, route *route_list, epair_t es[]) { boxf bb, absbb; - box bbox; absbb.LL.x = absbb.LL.y = MAXDOUBLE; absbb.UR.x = absbb.UR.y = -MAXDOUBLE; @@ -1564,6 +1563,7 @@ static DEBUG_FN void emitGraph(FILE *fp, maze *mp, size_t n_edges, absbb.UR.y = MAX(absbb.UR.y, bb.UR.y); } + boxf bbox; bbox.LL.x = absbb.LL.x + TRANS; bbox.LL.y = absbb.LL.y + TRANS; bbox.UR.x = absbb.UR.x + TRANS; -- 2.40.0