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/helpers/mu-office-lib/mu-office-lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/helpers') 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); -- cgit v1.2.3