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/fitz/stext-paragraph.c | |
parent | 73d7b296bd549a7e985ea9df9f13e6ad3701ef89 (diff) | |
download | mupdf-2d68de96c62c1e6d6a2b615336d99b671fc672b7.tar.xz |
Avoid double literals causing casts to float.
Diffstat (limited to 'source/fitz/stext-paragraph.c')
-rw-r--r-- | source/fitz/stext-paragraph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/fitz/stext-paragraph.c b/source/fitz/stext-paragraph.c index b28cb200..e275ecae 100644 --- a/source/fitz/stext-paragraph.c +++ b/source/fitz/stext-paragraph.c @@ -148,7 +148,7 @@ line_height_for_style(line_heights *lh, fz_stext_style *style) if (lh->lh[i].style == style) return lh->lh[i].height; } - return 0.0; /* Never reached */ + return 0.0f; /* Never reached */ } static void @@ -1161,7 +1161,7 @@ list_entry: if (chr->style != style) { float proper_step = line_height_for_style(lh, chr->style); - if (proper_step * 0.95 <= line->distance && line->distance <= proper_step * 1.05) + if (proper_step * 0.95f <= line->distance && line->distance <= proper_step * 1.05f) { ok = 1; break; @@ -1225,7 +1225,7 @@ force_paragraph: fz_point *region_max = &span->max; /* Treat adjacent spans as one big region */ - while (span->next && span->next->spacing < 1.5) + while (span->next && span->next->spacing < 1.5f) { span = span->next; region_max = &span->max; @@ -1310,7 +1310,7 @@ force_paragraph: fz_point *region_max = &span->max; /* Treat adjacent spans as one big region */ - while (span->next && span->next->spacing < 1.5) + while (span->next && span->next->spacing < 1.5f) { span = span->next; region_max = &span->max; @@ -1342,7 +1342,7 @@ force_paragraph: #ifdef DEBUG_ALIGN dump_span(span); #endif - for (sn = span->next; sn && sn->spacing < 1.5; sn = sn->next) + for (sn = span->next; sn && sn->spacing < 1.5f; sn = sn->next) { region_max = &sn->max; #ifdef DEBUG_ALIGN |