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/xps/xps-gradient.c | |
parent | 73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff) | |
download | mupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz |
Avoid double literals causing casts to float.
Diffstat (limited to 'source/xps/xps-gradient.c')
-rw-r--r-- | source/xps/xps-gradient.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/xps/xps-gradient.c b/source/xps/xps-gradient.c index 02279677..a7a7cf44 100644 --- a/source/xps/xps-gradient.c +++ b/source/xps/xps-gradient.c @@ -312,10 +312,10 @@ xps_draw_radial_gradient(fz_context *ctx, xps_document *doc, const fz_matrix *ct char *radius_x_att = fz_xml_att(root, "RadiusX"); char *radius_y_att = fz_xml_att(root, "RadiusY"); - x0 = y0 = 0.0; - x1 = y1 = 1.0; - xrad = 1.0; - yrad = 1.0; + x0 = y0 = 0.0f; + x1 = y1 = 1.0f; + xrad = 1.0f; + yrad = 1.0f; if (origin_att) xps_parse_point(ctx, doc, origin_att, &x0, &y0); @@ -335,7 +335,7 @@ xps_draw_radial_gradient(fz_context *ctx, xps_document *doc, const fz_matrix *ct fz_pre_scale(&local_ctm, 1, yrad/xrad); } - if (yrad != 0.0) + if (yrad != 0.0f) { invscale = xrad / yrad; y0 = y0 * invscale; |