* src/*/*: Fix C++ compilation; fix clang warnings.
This commit is contained in:
parent
8fc8b1310e
commit
6b992aaaf2
5
src/cache/ftcbasic.c
vendored
5
src/cache/ftcbasic.c
vendored
@ -45,8 +45,9 @@
|
||||
FT_BOOL( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \
|
||||
(a)->load_flags == (b)->load_flags )
|
||||
|
||||
#define FTC_BASIC_ATTR_HASH( a ) \
|
||||
( FTC_SCALER_HASH( &(a)->scaler ) + 31 * (a)->load_flags )
|
||||
#define FTC_BASIC_ATTR_HASH( a ) \
|
||||
( FTC_SCALER_HASH( &(a)->scaler ) + \
|
||||
(FT_Offset)( 31 * (a)->load_flags ) )
|
||||
|
||||
|
||||
typedef struct FTC_BasicQueryRec_
|
||||
|
@ -445,7 +445,7 @@
|
||||
cf2_stack_getReal( opStack,
|
||||
delta++ ) ) );
|
||||
|
||||
FT_TRACE6(( "%f ", (float) sum / 65536 ));
|
||||
FT_TRACE6(( "%f ", (double)sum / 65536 ));
|
||||
|
||||
/* store blended result */
|
||||
cf2_stack_setReal( opStack, i + base, sum );
|
||||
@ -2282,7 +2282,7 @@
|
||||
|
||||
arg = cf2_stack_popFixed( opStack );
|
||||
if ( arg > 0 )
|
||||
arg = (CF2_F16Dot16)FT_SqrtFixed( arg );
|
||||
arg = (CF2_F16Dot16)FT_SqrtFixed( (FT_UInt32)arg );
|
||||
else
|
||||
arg = 0;
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
|
||||
typedef enum gpos_lookup_type_
|
||||
{
|
||||
GPOS_LOOKUP_TYPE_NONE = 0,
|
||||
GPOS_LOOKUP_TYPE_SINGLE_ADJUSTMENT = 1,
|
||||
GPOS_LOOKUP_TYPE_PAIR_ADJUSTMENT = 2,
|
||||
GPOS_LOOKUP_TYPE_CURSIVE_ATTACHMENT = 3,
|
||||
@ -132,14 +133,14 @@
|
||||
else
|
||||
{
|
||||
context->current_lookup_table = NULL;
|
||||
context->current_lookup_type = 0;
|
||||
context->current_lookup_type = GPOS_LOOKUP_TYPE_NONE;
|
||||
context->subtable_count = 0;
|
||||
context->subtable_offsets = NULL;
|
||||
}
|
||||
|
||||
context->subtable_idx = 0;
|
||||
context->subtable = NULL;
|
||||
context->subtable_type = 0;
|
||||
context->subtable_type = GPOS_LOOKUP_TYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
@ -195,7 +196,7 @@
|
||||
FT_Int m;
|
||||
|
||||
FT_Int straw;
|
||||
FT_Int needle = glyph;
|
||||
FT_Int needle = (FT_Int)glyph;
|
||||
|
||||
|
||||
/* Binary search. */
|
||||
@ -230,7 +231,7 @@
|
||||
|
||||
FT_Int straw_start;
|
||||
FT_Int straw_end;
|
||||
FT_Int needle = glyph;
|
||||
FT_Int needle = (FT_Int)glyph;
|
||||
|
||||
|
||||
/* Binary search. */
|
||||
@ -254,14 +255,11 @@
|
||||
FT_PEEK_USHORT( range_record + 4 );
|
||||
|
||||
|
||||
return start_coverage_index + glyph - straw_start;
|
||||
return (FT_Int)start_coverage_index + (FT_Int)glyph - straw_start;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return -1; /* unsupported */
|
||||
}
|
||||
|
||||
return -1;
|
||||
@ -303,7 +301,7 @@
|
||||
|
||||
FT_Int straw_start;
|
||||
FT_Int straw_end;
|
||||
FT_Int needle = glyph;
|
||||
FT_Int needle = (FT_Int)glyph;
|
||||
|
||||
|
||||
while ( l <= r )
|
||||
@ -325,9 +323,6 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return -1; /* Unsupported definition type, return an error. */
|
||||
}
|
||||
|
||||
/* "All glyphs not assigned to a class fall into class 0." */
|
||||
@ -514,7 +509,7 @@
|
||||
pair_value_count = FT_PEEK_USHORT( pair_value_table );
|
||||
pair_value_array = pair_value_table + 2;
|
||||
|
||||
needle = right_glyph;
|
||||
needle = (FT_Int)right_glyph;
|
||||
r = pair_value_count - 1;
|
||||
l = 0;
|
||||
|
||||
@ -584,9 +579,6 @@
|
||||
|
||||
return x_advance;
|
||||
}
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,7 +240,7 @@
|
||||
if ( n < num_names )
|
||||
{
|
||||
FT_TRACE4(( "load_format_20: %hu PostScript names are truncated\n",
|
||||
num_names - n ));
|
||||
(FT_UShort)( num_names - n ) ));
|
||||
|
||||
for ( ; n < num_names; n++ )
|
||||
name_strings[n] = p_end;
|
||||
|
Loading…
Reference in New Issue
Block a user