From 2d68de96c62c1e6d6a2b615336d99b671fc672b7 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 29 May 2017 00:10:28 +0800 Subject: Avoid double literals causing casts to float. --- source/fitz/geometry.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/fitz/geometry.c') diff --git a/source/fitz/geometry.c b/source/fitz/geometry.c index 64abd5c4..8bed26a1 100644 --- a/source/fitz/geometry.c +++ b/source/fitz/geometry.c @@ -232,7 +232,6 @@ fz_invert_matrix(fz_matrix *dst, const fz_matrix *src) int fz_try_invert_matrix(fz_matrix *dst, const fz_matrix *src) { - /* Be careful to cope with dst == src */ double sa = (double)src->a; double sb = (double)src->b; double sc = (double)src->c; @@ -372,13 +371,13 @@ fz_round_rect(fz_irect * restrict b, const fz_rect *restrict r) { int i; - i = floorf(r->x0 + 0.001); + i = floorf(r->x0 + 0.001f); b->x0 = fz_clamp(i, MIN_SAFE_INT, MAX_SAFE_INT); - i = floorf(r->y0 + 0.001); + i = floorf(r->y0 + 0.001f); b->y0 = fz_clamp(i, MIN_SAFE_INT, MAX_SAFE_INT); - i = ceilf(r->x1 - 0.001); + i = ceilf(r->x1 - 0.001f); b->x1 = fz_clamp(i, MIN_SAFE_INT, MAX_SAFE_INT); - i = ceilf(r->y1 - 0.001); + i = ceilf(r->y1 - 0.001f); b->y1 = fz_clamp(i, MIN_SAFE_INT, MAX_SAFE_INT); return b; -- cgit v1.2.3