More compiler warning fixes.
*/*: Use cast to `FT_Bool' (or `Bool') where appropriate.
This commit is contained in:
parent
2d9caa0606
commit
c06889eb2c
@ -1,3 +1,9 @@
|
||||
2013-06-12 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
More compiler warning fixes.
|
||||
|
||||
*/*: Use cast to `FT_Bool' (or `Bool') where appropriate.
|
||||
|
||||
2013-06-10 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype] Improve handling of broken sbit advance widths.
|
||||
|
@ -4513,9 +4513,9 @@
|
||||
service = (FT_Service_Properties)interface;
|
||||
|
||||
if ( set )
|
||||
missing_func = !service->set_property;
|
||||
missing_func = (FT_Bool)( !service->set_property );
|
||||
else
|
||||
missing_func = !service->get_property;
|
||||
missing_func = (FT_Bool)( !service->get_property );
|
||||
|
||||
if ( missing_func )
|
||||
{
|
||||
|
@ -157,7 +157,8 @@
|
||||
|
||||
/* if a CID fontDict has changed, we need to recompute some cached */
|
||||
/* data */
|
||||
needExtraSetup = font->lastSubfont != cf2_getSubfont( decoder );
|
||||
needExtraSetup =
|
||||
(FT_Bool)( font->lastSubfont != cf2_getSubfont( decoder ) );
|
||||
|
||||
/* if ppem has changed, we need to recompute some cached data */
|
||||
/* note: because of CID font matrix concatenation, ppem and transform */
|
||||
@ -170,7 +171,7 @@
|
||||
}
|
||||
|
||||
/* copy hinted flag on each call */
|
||||
font->hinted = font->renderingFlags & CF2_FlagsHinted;
|
||||
font->hinted = (FT_Bool)( font->renderingFlags & CF2_FlagsHinted );
|
||||
|
||||
/* determine if transform has changed; */
|
||||
/* include Fontmatrix but ignore translation */
|
||||
@ -204,7 +205,8 @@
|
||||
*/
|
||||
if ( font->stemDarkened != ( font->renderingFlags & CF2_FlagsDarkened ) )
|
||||
{
|
||||
font->stemDarkened = font->renderingFlags & CF2_FlagsDarkened;
|
||||
font->stemDarkened =
|
||||
(FT_Bool)( font->renderingFlags & CF2_FlagsDarkened );
|
||||
|
||||
/* blue zones depend on darkened flag */
|
||||
needExtraSetup = TRUE;
|
||||
|
@ -217,52 +217,52 @@
|
||||
FT_LOCAL_DEF( FT_Bool )
|
||||
cf2_hint_isValid( const CF2_Hint hint )
|
||||
{
|
||||
return hint->flags != 0;
|
||||
return (FT_Bool)( hint->flags != 0 );
|
||||
}
|
||||
|
||||
|
||||
static FT_Bool
|
||||
cf2_hint_isPair( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags &
|
||||
( CF2_PairBottom | CF2_PairTop ) ) != 0;
|
||||
return (FT_Bool)( ( hint->flags &
|
||||
( CF2_PairBottom | CF2_PairTop ) ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
static FT_Bool
|
||||
cf2_hint_isPairTop( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags & CF2_PairTop ) != 0;
|
||||
return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Bool )
|
||||
cf2_hint_isTop( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags &
|
||||
( CF2_PairTop | CF2_GhostTop ) ) != 0;
|
||||
return (FT_Bool)( ( hint->flags &
|
||||
( CF2_PairTop | CF2_GhostTop ) ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Bool )
|
||||
cf2_hint_isBottom( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags &
|
||||
( CF2_PairBottom | CF2_GhostBottom ) ) != 0;
|
||||
return (FT_Bool)( ( hint->flags &
|
||||
( CF2_PairBottom | CF2_GhostBottom ) ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
static FT_Bool
|
||||
cf2_hint_isLocked( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags & CF2_Locked ) != 0;
|
||||
return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
static FT_Bool
|
||||
cf2_hint_isSynthetic( const CF2_Hint hint )
|
||||
{
|
||||
return ( hint->flags & CF2_Synthetic ) != 0;
|
||||
return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 );
|
||||
}
|
||||
|
||||
|
||||
@ -462,7 +462,8 @@
|
||||
hintmap->edge[i].dsCoord + moveDown - downMinCounter )
|
||||
{
|
||||
move = moveDown;
|
||||
saveEdge = moveUp < -moveDown; /* true if non-optimum move */
|
||||
/* true if non-optimum move */
|
||||
saveEdge = (FT_Bool)( moveUp < -moveDown );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -287,7 +287,7 @@
|
||||
{
|
||||
CF2_UInt i;
|
||||
CF2_UInt count = cf2_stack_count( opStack );
|
||||
FT_Bool hasWidthArg = count & 1;
|
||||
FT_Bool hasWidthArg = (FT_Bool)( count & 1 );
|
||||
|
||||
/* variable accumulates delta values from operand stack */
|
||||
CF2_Fixed position = hintOffset;
|
||||
@ -357,8 +357,8 @@
|
||||
|
||||
if ( doConditionalLastRead )
|
||||
{
|
||||
FT_Bool lastIsX = cf2_fixedAbs( vals[10] - *curX ) >
|
||||
cf2_fixedAbs( vals[11] - *curY );
|
||||
FT_Bool lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) >
|
||||
cf2_fixedAbs( vals[11] - *curY ) );
|
||||
CF2_Fixed lastVal = cf2_stack_getReal( opStack, index );
|
||||
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
FT_LOCAL_DEF( FT_Bool )
|
||||
cf2_buf_isEnd( CF2_Buffer buf )
|
||||
{
|
||||
return buf->ptr >= buf->end;
|
||||
return (FT_Bool)( buf->ptr >= buf->end );
|
||||
}
|
||||
|
||||
|
||||
|
@ -453,8 +453,10 @@
|
||||
#define FRAC( x ) ( (x) & ( ras.precision - 1 ) )
|
||||
#define SCALED( x ) ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )
|
||||
|
||||
#define IS_BOTTOM_OVERSHOOT( x ) ( CEILING( x ) - x >= ras.precision_half )
|
||||
#define IS_TOP_OVERSHOOT( x ) ( x - FLOOR( x ) >= ras.precision_half )
|
||||
#define IS_BOTTOM_OVERSHOOT( x ) \
|
||||
(Bool)( CEILING( x ) - x >= ras.precision_half )
|
||||
#define IS_TOP_OVERSHOOT( x ) \
|
||||
(Bool)( x - FLOOR( x ) >= ras.precision_half )
|
||||
|
||||
/* The most used variables are positioned at the top of the structure. */
|
||||
/* Thus, their offset can be coded with less opcodes, resulting in a */
|
||||
|
@ -72,7 +72,7 @@
|
||||
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_INCREMENTAL
|
||||
#define IS_INCREMENTAL ( face->root.internal->incremental_interface != 0 )
|
||||
#define IS_INCREMENTAL (FT_Bool)( face->root.internal->incremental_interface != 0 )
|
||||
#else
|
||||
#define IS_INCREMENTAL 0
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user