diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-05-29 00:10:28 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-05-31 20:29:30 +0800 |
commit | 2d68de96c62c1e6d6a2b615336d99b671fc672b7 (patch) | |
tree | c309b8fdf623a0fd56aebc38c863b596e23c379f /source/fitz/geometry.c | |
parent | 73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff) | |
download | mupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz |
Avoid double literals causing casts to float.
Diffstat (limited to 'source/fitz/geometry.c')
-rw-r--r-- | source/fitz/geometry.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; |