freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [pshinter] Avoid unnecessary zeroing.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [pshinter] Avoid unnecessary zeroing.
Date: Thu, 20 Jan 2022 15:06:28 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/pshinter/pshalgo.c
    ... ... @@ -182,9 +182,9 @@
    182 182
         count = hints->num_hints;
    
    183 183
     
    
    184 184
         /* allocate our tables */
    
    185
    -    if ( FT_NEW_ARRAY( table->sort,  2 * count     ) ||
    
    186
    -         FT_NEW_ARRAY( table->hints,     count     ) ||
    
    187
    -         FT_NEW_ARRAY( table->zones, 2 * count + 1 ) )
    
    185
    +    if ( FT_QNEW_ARRAY( table->sort,  2 * count     ) ||
    
    186
    +         FT_QNEW_ARRAY( table->hints,     count     ) ||
    
    187
    +         FT_QNEW_ARRAY( table->zones, 2 * count + 1 ) )
    
    188 188
           goto Exit;
    
    189 189
     
    
    190 190
         table->max_hints   = count;
    
    ... ... @@ -1167,8 +1167,8 @@
    1167 1167
         memory = glyph->memory = globals->memory;
    
    1168 1168
     
    
    1169 1169
         /* allocate and setup points + contours arrays */
    
    1170
    -    if ( FT_NEW_ARRAY( glyph->points,   outline->n_points   ) ||
    
    1171
    -         FT_NEW_ARRAY( glyph->contours, outline->n_contours ) )
    
    1170
    +    if ( FT_QNEW_ARRAY( glyph->points,   outline->n_points   ) ||
    
    1171
    +         FT_QNEW_ARRAY( glyph->contours, outline->n_contours ) )
    
    1172 1172
           goto Exit;
    
    1173 1173
     
    
    1174 1174
         glyph->num_points   = (FT_UInt)outline->n_points;
    
    ... ... @@ -1797,7 +1797,7 @@
    1797 1797
           FT_Error  error;
    
    1798 1798
     
    
    1799 1799
     
    
    1800
    -      if ( FT_NEW_ARRAY( strongs, num_strongs ) )
    
    1800
    +      if ( FT_QNEW_ARRAY( strongs, num_strongs ) )
    
    1801 1801
             return;
    
    1802 1802
         }
    
    1803 1803
     
    


  • reply via email to

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