diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-09-30 22:59:04 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-09-30 22:59:04 -0400 |
commit | 68fae526c447f646df0a4058fd5bc651eb38ce71 (patch) | |
tree | a0a0b551800b36cc5df07f75c5067c37d75b1517 | |
parent | 1d79c892cf259577d3e68e2cb2c7bef819e4425d (diff) | |
download | freetype2-68fae526c447f646df0a4058fd5bc651eb38ce71.tar.gz |
* src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
-rw-r--r-- | src/autofit/afhints.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index 4bf6d66dd..5506afda2 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -862,7 +862,7 @@ { FT_Error error = FT_Err_Ok; AF_Point points; - FT_UInt old_max, new_max; + FT_Int old_max, new_max; FT_Fixed x_scale = hints->x_scale; FT_Fixed y_scale = hints->y_scale; FT_Pos x_delta = hints->x_delta; @@ -879,8 +879,8 @@ hints->axis[1].num_edges = 0; /* first of all, reallocate the contours array if necessary */ - new_max = (FT_UInt)outline->n_contours; - old_max = (FT_UInt)hints->max_contours; + new_max = outline->n_contours; + old_max = hints->max_contours; if ( new_max <= AF_CONTOURS_EMBEDDED ) { @@ -895,12 +895,12 @@ if ( hints->contours == hints->embedded.contours ) hints->contours = NULL; - new_max = ( new_max + 3 ) & ~3U; /* round up to a multiple of 4 */ + new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */ if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) ) goto Exit; - hints->max_contours = (FT_Int)new_max; + hints->max_contours = new_max; } /* @@ -908,8 +908,8 @@ * note that we reserve two additional point positions, used to * hint metrics appropriately */ - new_max = (FT_UInt)( outline->n_points + 2 ); - old_max = (FT_UInt)hints->max_points; + new_max = outline->n_points + 2; + old_max = hints->max_points; if ( new_max <= AF_POINTS_EMBEDDED ) { @@ -924,12 +924,12 @@ if ( hints->points == hints->embedded.points ) hints->points = NULL; - new_max = ( new_max + 2 + 7 ) & ~7U; /* round up to a multiple of 8 */ + new_max = ( new_max + 2 + 7 ) & ~7; /* round up to a multiple of 8 */ if ( FT_RENEW_ARRAY( hints->points, old_max, new_max ) ) goto Exit; - hints->max_points = (FT_Int)new_max; + hints->max_points = new_max; } hints->num_points = outline->n_points; |