diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2005-11-23 19:55:23 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2005-11-23 19:55:23 +0000 |
commit | 86351a44bb497dbab0ec6720c50b7892668c8f42 (patch) | |
tree | c8a8350be12c256d55a34f9690cba493d548e44b /pango/mapping.c | |
parent | bb5b651edbc041fd9677b40a0fc2ff9b491a0371 (diff) | |
download | pango-86351a44bb497dbab0ec6720c50b7892668c8f42.tar.gz |
Remove cast to double in things like a = b / c where a, b, and c are all
2005-11-23 Behdad Esfahbod <behdad@gnome.org>
* pango/mapping.c (pango_glyph_string_index_to_x),
pango/pango-layout.c (pango_layout_iter_get_char_extents):
Remove cast to double in things like a = b / c where a, b,
and c are all ints. (#312469, Sven Neumann)
Diffstat (limited to 'pango/mapping.c')
-rw-r--r-- | pango/mapping.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pango/mapping.c b/pango/mapping.c index c1672519..db66c7ec 100644 --- a/pango/mapping.c +++ b/pango/mapping.c @@ -148,9 +148,8 @@ pango_glyph_string_index_to_x (PangoGlyphString *glyphs, if (trailing) cluster_offset += 1; - *x_pos = (((double)(cluster_chars - cluster_offset)) * start_xpos + - ((double)cluster_offset) * end_xpos) / - cluster_chars; + *x_pos = ((cluster_chars - cluster_offset) * start_xpos + + cluster_offset * end_xpos) / cluster_chars; } /** |