summaryrefslogtreecommitdiff
path: root/src/autofit/afhints.c
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2023-02-07 22:24:53 +0100
committerWerner Lemberg <wl@gnu.org>2023-02-08 21:09:32 +0100
commitbe724c8142a3f5381fac436becb842f808f82259 (patch)
treee656c834cfef2b9a20919e361e91cfc6d8e4d753 /src/autofit/afhints.c
parent37bc7c260401e7e34b77d9e04d4c32bf760e1672 (diff)
downloadfreetype2-be724c8142a3f5381fac436becb842f808f82259.tar.gz
For debugging, avoid implicit conversion from integer to double.
Otherwise we get zillions of clang 15 warnings. * src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/base/ftobjs.c, src/base/ftoutln.c, src/cff/cffparse.c, src/raster/ftraster.c, src/sfnt/pngshim.c, src/truetype/ttgload.c, src/truetype/ttgxvar.c, src/truetype/ttobjs.c, src/type1/t1gload.c: Use `double` cast in debugging and tracing macros.
Diffstat (limited to 'src/autofit/afhints.c')
-rw-r--r--src/autofit/afhints.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index 230613be0..34bb6a34f 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -471,10 +471,10 @@
point->fx,
point->fy,
- point->ox / 64.0,
- point->oy / 64.0,
- point->x / 64.0,
- point->y / 64.0,
+ (double)point->ox / 64,
+ (double)point->oy / 64,
+ (double)point->x / 64,
+ (double)point->y / 64,
af_print_idx( buf5, af_get_strong_edge_index( hints,
point->before,
@@ -692,13 +692,13 @@
if ( dimension == AF_DIMENSION_HORZ )
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
"vertical",
- 65536.0 * 64.0 / hints->x_scale,
- 10.0 * hints->x_scale / 65536.0 / 64.0 ));
+ 65536 * 64 / (double)hints->x_scale,
+ 10 * (double)hints->x_scale / 65536 / 64 ));
else
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
"horizontal",
- 65536.0 * 64.0 / hints->y_scale,
- 10.0 * hints->y_scale / 65536.0 / 64.0 ));
+ 65536 * 64 / (double)hints->y_scale,
+ 10 * (double)hints->y_scale / 65536 / 64 ));
if ( axis->num_edges )
{
@@ -714,14 +714,14 @@
AF_DUMP(( " %5d %7.2f %5s %4s %5s"
" %c %7.2f %7.2f %11s\n",
AF_INDEX_NUM( edge, edges ),
- (int)edge->opos / 64.0,
+ (double)(int)edge->opos / 64,
af_dir_str( (AF_Direction)edge->dir ),
af_print_idx( buf1, AF_INDEX_NUM( edge->link, edges ) ),
af_print_idx( buf2, AF_INDEX_NUM( edge->serif, edges ) ),
edge->blue_edge ? 'y' : 'n',
- edge->opos / 64.0,
- edge->pos / 64.0,
+ (double)edge->opos / 64,
+ (double)edge->pos / 64,
af_edge_flags_to_string( edge->flags ) ));
AF_DUMP(( "\n" ));
}