diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index 27d7bc1a9..099a5f82a 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -1049,13 +1049,13 @@ AF_Point* contour = hints->contours; AF_Point* contour_limit = contour + hints->num_contours; short* end = outline->contours; - short idx = 0; + FT_Int idx = 0; for ( ; contour < contour_limit; contour++, end++ ) { contour[0] = points + idx; - idx = (short)( end[0] + 1 ); + idx = *end + 1; } } diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c index e0c107f47..4d94c3d5d 100644 --- a/src/base/ftgloadr.c +++ b/src/base/ftgloadr.c @@ -357,9 +357,6 @@ { FT_GlyphLoad base; FT_GlyphLoad current; - - FT_Int n_curr_contours; - FT_Int n_base_points; FT_Int n; @@ -369,20 +366,13 @@ base = &loader->base; current = &loader->current; - n_curr_contours = current->outline.n_contours; - n_base_points = base->outline.n_points; - - base->outline.n_points = - (short)( base->outline.n_points + current->outline.n_points ); - base->outline.n_contours = - (short)( base->outline.n_contours + current->outline.n_contours ); - - base->num_subglyphs += current->num_subglyphs; - /* adjust contours count in newest outline */ - for ( n = 0; n < n_curr_contours; n++ ) - current->outline.contours[n] = - (short)( current->outline.contours[n] + n_base_points ); + for ( n = 0; n < current->outline.n_contours; n++ ) + current->outline.contours[n] += base->outline.n_points; + + base->outline.n_points += current->outline.n_points; + base->outline.n_contours += current->outline.n_contours; + base->num_subglyphs += current->num_subglyphs; /* prepare for another new glyph image */ FT_GlyphLoader_Prepare( loader ); diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index b251b3596..d3a61fd64 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -1677,8 +1677,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -1760,8 +1759,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } } @@ -1959,8 +1957,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -2039,8 +2036,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } } @@ -2267,8 +2263,7 @@ if ( !error ) { if ( outline->n_contours > 0 ) - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; outline->n_contours++; } @@ -2347,8 +2342,7 @@ outline->n_points--; } else - outline->contours[outline->n_contours - 1] = - (short)( outline->n_points - 1 ); + outline->contours[outline->n_contours - 1] = outline->n_points - 1; } }