From 35ae574a51363f2e5a6d1cda1ff168e1b2bd9fc0 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 2 Oct 2008 10:40:52 +0000 Subject: [PATCH] Add casts for stupid compilers. Reported by Graham. --- src/truetype/ttgload.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 56857a344..13991817a 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -382,8 +382,8 @@ for ( ; vec < vec_limit; vec++, flag++ ) { - FT_Pos y = 0; - FT_Byte f = *flag; + FT_Pos y = 0; + FT_Byte f = *flag; if ( f & 2 ) @@ -405,7 +405,8 @@ x += y; vec->x = x; - *flag = f & ~( 2 | 16 ); + /* the cast is for stupid compilers */ + *flag = (FT_Byte)( f & ~( 2 | 16 ) ); } /* reading the Y coordinates */ @@ -417,8 +418,8 @@ for ( ; vec < vec_limit; vec++, flag++ ) { - FT_Pos y = 0; - FT_Byte f = *flag; + FT_Pos y = 0; + FT_Byte f = *flag; if ( f & 4 ) @@ -440,7 +441,8 @@ x += y; vec->y = x; - *flag = f & FT_CURVE_TAG_ON; + /* the cast is for stupid compilers */ + *flag = (FT_Byte)( f & FT_CURVE_TAG_ON ); } outline->n_points = (FT_UShort)n_points;