From cb3c2e3eca8bf31ac861739272ba1e182f4ec295 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 8 Apr 2012 23:52:40 -0700 Subject: [PATCH] composite.c: use 'double' consistently * composite.c (get_composition_id): Use 'double' consistently instead of converting 'float' to 'double' and vice versa; this is easier to understand and avoids a GCC warning. --- src/ChangeLog | 7 +++++++ src/composite.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eea8345b4f4..dbff8e35492 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-04-09 Paul Eggert + + composite.c: use 'double' consistently + * composite.c (get_composition_id): Use 'double' consistently + instead of converting 'float' to 'double' and vice versa; this is + easier to understand and avoids a GCC warning. + 2012-04-09 Glenn Morris * Makefile.in: Generate leim-list with bootstrap-emacs, in diff --git a/src/composite.c b/src/composite.c index c44c8e565d0..abf71c275fa 100644 --- a/src/composite.c +++ b/src/composite.c @@ -355,7 +355,7 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars, else { /* Rule-base composition. */ - float leftmost = 0.0, rightmost; + double leftmost = 0.0, rightmost; ch = XINT (key_contents[0]); rightmost = ch != '\t' ? CHAR_WIDTH (ch) : 1; @@ -364,7 +364,7 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars, { int rule, gref, nref; int this_width; - float this_left; + double this_left; rule = XINT (key_contents[i]); ch = XINT (key_contents[i + 1]); -- 2.39.2