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/pdf/pdf-font.c | |
parent | 73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff) | |
download | mupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz |
Avoid double literals causing casts to float.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r-- | source/pdf/pdf-font.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index 43390247..037372c1 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -1489,7 +1489,7 @@ float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize, { pdf_hmtx h; size_t i = 0; - float x = 0.0; + float x = 0.0f; while(i < len) { @@ -1497,7 +1497,7 @@ float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize, h = pdf_lookup_hmtx(ctx, fontdesc, buf[i]); - span = h.w * fontsize / 1000.0; + span = h.w * fontsize / 1000.0f; if (x + span > room) break; |