[psaux, type1, type42] Avoid annecessary zeroing.
* src/psaux/psobjs.c (ps_table_new): Use FT_QNEW_ARRAY. * src/type1/t1load.c (parse_encoding): Ditto. * src/type42/t42parse.c (t42_parse_encoding): Ditto.
This commit is contained in:
parent
02fa26f4cd
commit
0d2b4952a3
|
@ -78,8 +78,8 @@
|
||||||
|
|
||||||
|
|
||||||
table->memory = memory;
|
table->memory = memory;
|
||||||
if ( FT_NEW_ARRAY( table->elements, count ) ||
|
if ( FT_QNEW_ARRAY( table->elements, count ) ||
|
||||||
FT_NEW_ARRAY( table->lengths, count ) )
|
FT_QNEW_ARRAY( table->lengths, count ) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
table->max_elems = count;
|
table->max_elems = count;
|
||||||
|
|
|
@ -1530,8 +1530,8 @@
|
||||||
|
|
||||||
/* we use a T1_Table to store our charnames */
|
/* we use a T1_Table to store our charnames */
|
||||||
loader->num_chars = encode->num_chars = array_size;
|
loader->num_chars = encode->num_chars = array_size;
|
||||||
if ( FT_NEW_ARRAY( encode->char_index, array_size ) ||
|
if ( FT_QNEW_ARRAY( encode->char_index, array_size ) ||
|
||||||
FT_NEW_ARRAY( encode->char_name, array_size ) ||
|
FT_QNEW_ARRAY( encode->char_name, array_size ) ||
|
||||||
FT_SET_ERROR( psaux->ps_table_funcs->init(
|
FT_SET_ERROR( psaux->ps_table_funcs->init(
|
||||||
char_table, array_size, memory ) ) )
|
char_table, array_size, memory ) ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -363,8 +363,8 @@
|
||||||
|
|
||||||
/* we use a T1_Table to store our charnames */
|
/* we use a T1_Table to store our charnames */
|
||||||
loader->num_chars = encode->num_chars = count;
|
loader->num_chars = encode->num_chars = count;
|
||||||
if ( FT_NEW_ARRAY( encode->char_index, count ) ||
|
if ( FT_QNEW_ARRAY( encode->char_index, count ) ||
|
||||||
FT_NEW_ARRAY( encode->char_name, count ) ||
|
FT_QNEW_ARRAY( encode->char_name, count ) ||
|
||||||
FT_SET_ERROR( psaux->ps_table_funcs->init(
|
FT_SET_ERROR( psaux->ps_table_funcs->init(
|
||||||
char_table, count, memory ) ) )
|
char_table, count, memory ) ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue