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.
This commit is contained in:
Paul Eggert 2012-04-08 23:52:40 -07:00
parent 50fe702a88
commit cb3c2e3eca
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
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 <rgm@gnu.org>
* Makefile.in: Generate leim-list with bootstrap-emacs, in

View file

@ -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]);