summaryrefslogtreecommitdiff
path: root/source/tests
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/tests
parent73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff)
downloadmupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz
Avoid double literals causing casts to float.
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/mu-office-test.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/tests/mu-office-test.c b/source/tests/mu-office-test.c
index c734500a..aef50981 100644
--- a/source/tests/mu-office-test.c
+++ b/source/tests/mu-office-test.c
@@ -89,8 +89,8 @@ test_async(MuOfficeLib *mu)
fprintf(stderr, "Page size = %g x %g\n", w, h);
/* Allocate ourselves a bitmap */
- bitmap.width = (int)(w * 1.5 + 0.5);
- bitmap.height = (int)(h * 1.5 + 0.5);
+ bitmap.width = (int)(w * 1.5f + 0.5f);
+ bitmap.height = (int)(h * 1.5f + 0.5f);
bitmap.lineSkip = bitmap.width * 4;
bitmap.memptr = malloc(bitmap.lineSkip * bitmap.height);
@@ -99,8 +99,8 @@ test_async(MuOfficeLib *mu)
area.origin.y = 0;
area.renderArea.x = 0;
area.renderArea.y = 0;
- area.renderArea.width = (float)bitmap.width;
- area.renderArea.height = (float)bitmap.height;
+ area.renderArea.width = bitmap.width;
+ area.renderArea.height = bitmap.height;
/* Render into the bitmap */
err = MuOfficePage_render(page, 1.5f, &bitmap, &area, render_progress, (void *)5678, &render);
@@ -178,8 +178,8 @@ test_sync(MuOfficeLib *mu)
fprintf(stderr, "Page size = %g x %g\n", w, h);
/* Allocate ourselves a bitmap */
- bitmap.width = (int)(w * 1.5 + 0.5);
- bitmap.height = (int)(h * 1.5 + 0.5);
+ bitmap.width = (int)(w * 1.5f + 0.5f);
+ bitmap.height = (int)(h * 1.5f + 0.5f);
bitmap.lineSkip = bitmap.width * 4;
bitmap.memptr = malloc(bitmap.lineSkip * bitmap.height);
@@ -188,8 +188,8 @@ test_sync(MuOfficeLib *mu)
area.origin.y = 0;
area.renderArea.x = 0;
area.renderArea.y = 0;
- area.renderArea.width = (float)bitmap.width;
- area.renderArea.height = (float)bitmap.height;
+ area.renderArea.width = bitmap.width;
+ area.renderArea.height = bitmap.height;
/* Render into the bitmap */
err = MuOfficePage_render(page, 1.5f, &bitmap, &area, NULL, NULL, &render);