summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2021-09-14 22:55:50 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2021-09-14 22:55:50 -0400
commit801b7540dc1e2f0828aa94a6e407f86adb413bc7 (patch)
tree7c65fde69722514a94817d4471383006a45560c2
parent49270c17011491227ec7bd3fb73ede4f674aa065 (diff)
downloadfreetype2-801b7540dc1e2f0828aa94a6e407f86adb413bc7.tar.gz
Minor type adjustments.
* src/cff/cffobjs.c (cff_face_init): Reduce casting. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto. * src/type1/t1load.c (T1_Set_MM_Design): Ditto.
-rw-r--r--src/cff/cffobjs.c8
-rw-r--r--src/truetype/ttobjs.c6
-rw-r--r--src/type1/t1load.c10
3 files changed, 12 insertions, 12 deletions
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 9b5b17c25..4a040462b 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -1054,11 +1054,11 @@
{
FT_CharMapRec cmaprec;
FT_CharMap cmap;
- FT_UInt nn;
+ FT_Int nn;
CFF_Encoding encoding = &cff->encoding;
- for ( nn = 0; nn < (FT_UInt)cffface->num_charmaps; nn++ )
+ for ( nn = 0; nn < cffface->num_charmaps; nn++ )
{
cmap = cffface->charmaps[nn];
@@ -1083,7 +1083,7 @@
cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;
cmaprec.encoding = FT_ENCODING_UNICODE;
- nn = (FT_UInt)cffface->num_charmaps;
+ nn = cffface->num_charmaps;
error = FT_CMap_New( &cff_cmap_unicode_class_rec, NULL,
&cmaprec, NULL );
@@ -1094,7 +1094,7 @@
error = FT_Err_Ok;
/* if no Unicode charmap was previously selected, select this one */
- if ( !cffface->charmap && nn != (FT_UInt)cffface->num_charmaps )
+ if ( !cffface->charmap && nn != cffface->num_charmaps )
cffface->charmap = cffface->charmaps[nn];
Skip_Unicode:
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index b70f9a91a..72a96503e 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -1240,11 +1240,11 @@
/* rescale CVT when needed */
if ( size->cvt_ready < 0 )
{
- FT_UInt i;
+ FT_UShort i;
/* all twilight points are originally zero */
- for ( i = 0; i < (FT_UInt)size->twilight.n_points; i++ )
+ for ( i = 0; i < size->twilight.n_points; i++ )
{
size->twilight.org[i].x = 0;
size->twilight.org[i].y = 0;
@@ -1253,7 +1253,7 @@
}
/* clear storage area */
- for ( i = 0; i < (FT_UInt)size->storage_size; i++ )
+ for ( i = 0; i < size->storage_size; i++ )
size->storage[i] = 0;
size->GS = tt_default_graphics_state;
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 497c26aa7..f7fb1ce85 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -580,7 +580,7 @@
{
FT_Error error;
PS_Blend blend = face->blend;
- FT_UInt n, p;
+ FT_UInt n;
FT_Fixed final_blends[T1_MAX_MM_DESIGNS];
@@ -599,7 +599,7 @@
PS_DesignMap map = blend->design_map + n;
FT_Long* designs = map->design_points;
FT_Fixed* blends = map->blend_points;
- FT_Int before = -1, after = -1;
+ FT_Int p, before = -1, after = -1;
/* use a default value if we don't have a coordinate */
@@ -608,7 +608,7 @@
else
design = ( designs[map->num_points - 1] - designs[0] ) / 2;
- for ( p = 0; p < (FT_UInt)map->num_points; p++ )
+ for ( p = 0; p < (FT_Int)map->num_points; p++ )
{
FT_Long p_design = designs[p];
@@ -622,11 +622,11 @@
if ( design < p_design )
{
- after = (FT_Int)p;
+ after = p;
break;
}
- before = (FT_Int)p;
+ before = p;
}
/* now interpolate if necessary */