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/svg/svg-run.c | |
parent | 73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff) | |
download | mupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz |
Avoid double literals causing casts to float.
Diffstat (limited to 'source/svg/svg-run.c')
-rw-r--r-- | source/svg/svg-run.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/svg/svg-run.c b/source/svg/svg-run.c index eead3b12..f02a8aca 100644 --- a/source/svg/svg-run.c +++ b/source/svg/svg-run.c @@ -109,10 +109,10 @@ svg_run_rect(fz_context *ctx, fz_device *dev, svg_document *doc, fz_xml *node, c ry = rx; if (ry_att && !rx_att) rx = ry; - if (rx > w * 0.5) - rx = w * 0.5; - if (ry > h * 0.5) - ry = h * 0.5; + if (rx > w * 0.5f) + rx = w * 0.5f; + if (ry > h * 0.5f) + ry = h * 0.5f; if (w <= 0 || h <= 0) return; @@ -478,15 +478,15 @@ svg_parse_path_data(fz_context *ctx, svg_document *doc, const char *str) /* saved control point for smooth curves */ int reset_smooth = 1; - float smooth_x = 0.0; - float smooth_y = 0.0; + float smooth_x = 0.0f; + float smooth_y = 0.0f; cmd = 0; nargs = 0; fz_try(ctx) { - fz_moveto(ctx, path, 0.0, 0.0); /* for the case of opening 'm' */ + fz_moveto(ctx, path, 0.0f, 0.0f); /* for the case of opening 'm' */ while (*str) { @@ -517,8 +517,8 @@ svg_parse_path_data(fz_context *ctx, svg_document *doc, const char *str) if (reset_smooth) { - smooth_x = 0.0; - smooth_y = 0.0; + smooth_x = 0.0f; + smooth_y = 0.0f; } reset_smooth = 1; @@ -977,7 +977,7 @@ svg_parse_common(fz_context *ctx, svg_document *doc, fz_xml *node, svg_state *st } else { - stroke->miterlimit = 4.0; + stroke->miterlimit = 4.0f; } } |