freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 0d2b4952a: [psaux, type1, type42] Avoid annecessary z


From: Werner Lemberg
Subject: [freetype2] master 0d2b4952a: [psaux, type1, type42] Avoid annecessary zeroing.
Date: Thu, 20 Jan 2022 14:57:42 -0500 (EST)

branch: master
commit 0d2b4952a37218cbe82fb79a40784c01ca172b56
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    [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.
---
 src/psaux/psobjs.c    | 4 ++--
 src/type1/t1load.c    | 4 ++--
 src/type42/t42parse.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 323c43ba1..06134740c 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -78,8 +78,8 @@
 
 
     table->memory = memory;
-    if ( FT_NEW_ARRAY( table->elements, count ) ||
-         FT_NEW_ARRAY( table->lengths,  count ) )
+    if ( FT_QNEW_ARRAY( table->elements, count ) ||
+         FT_QNEW_ARRAY( table->lengths,  count ) )
       goto Exit;
 
     table->max_elems = count;
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 2cdf3ed37..6f54e7d3f 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1530,8 +1530,8 @@
 
       /* we use a T1_Table to store our charnames */
       loader->num_chars = encode->num_chars = array_size;
-      if ( FT_NEW_ARRAY( encode->char_index, array_size )     ||
-           FT_NEW_ARRAY( encode->char_name,  array_size )     ||
+      if ( FT_QNEW_ARRAY( encode->char_index, array_size )    ||
+           FT_QNEW_ARRAY( encode->char_name,  array_size )    ||
            FT_SET_ERROR( psaux->ps_table_funcs->init(
                            char_table, array_size, memory ) ) )
       {
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 6714074f6..f14b4226c 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -363,8 +363,8 @@
 
       /* we use a T1_Table to store our charnames */
       loader->num_chars = encode->num_chars = count;
-      if ( FT_NEW_ARRAY( encode->char_index, count )     ||
-           FT_NEW_ARRAY( encode->char_name,  count )     ||
+      if ( FT_QNEW_ARRAY( encode->char_index, count )    ||
+           FT_QNEW_ARRAY( encode->char_name,  count )    ||
            FT_SET_ERROR( psaux->ps_table_funcs->init(
                            char_table, count, memory ) ) )
       {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]