summaryrefslogtreecommitdiff
path: root/source/helpers/mu-office-lib/mu-office-lib.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-05-29 00:10:28 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-05-31 20:29:30 +0800
commit2d68de96c62c1e6d6a2b615336d99b671fc672b7 (patch)
treec309b8fdf623a0fd56aebc38c863b596e23c379f /source/helpers/mu-office-lib/mu-office-lib.c
parent73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff)
downloadmupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz
Avoid double literals causing casts to float.
Diffstat (limited to 'source/helpers/mu-office-lib/mu-office-lib.c')
-rw-r--r--source/helpers/mu-office-lib/mu-office-lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/helpers/mu-office-lib/mu-office-lib.c b/source/helpers/mu-office-lib/mu-office-lib.c
index 65eae1a2..3e56369a 100644
--- a/source/helpers/mu-office-lib/mu-office-lib.c
+++ b/source/helpers/mu-office-lib/mu-office-lib.c
@@ -899,9 +899,9 @@ MuError MuOfficePage_getSizeForZoom( MuOfficePage *page,
h = 90 * (rect.y1 - rect.y0) / 72;
if (pWidth)
- *pWidth = (int)(w * zoom + 0.5);
+ *pWidth = (int)(w * zoom + 0.5f);
if (pHeight)
- *pHeight = (int)(h * zoom + 0.5);
+ *pHeight = (int)(h * zoom + 0.5f);
return MuError_OK;
}
@@ -1010,8 +1010,8 @@ static void render_worker(void *arg)
* integer width/heights. First calculate the target
* width/height. */
fz_bound_page(ctx, render->page->page, &page_bounds);
- scalex = (int)(90 * render->zoom * (page_bounds.x1 - page_bounds.x0) / 72 + 0.5);
- scaley = (int)(90 * render->zoom * (page_bounds.y1 - page_bounds.y0) / 72 + 0.5);
+ scalex = (int)(90 * render->zoom * (page_bounds.x1 - page_bounds.x0) / 72 + 0.5f);
+ scaley = (int)(90 * render->zoom * (page_bounds.y1 - page_bounds.y0) / 72 + 0.5f);
/* Now calculate the actual scale factors required */
scalex /= (page_bounds.x1 - page_bounds.x0);
scaley /= (page_bounds.y1 - page_bounds.y0);