freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: [cache] Revert to some zeroi


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: [cache] Revert to some zeroing.
Date: Wed, 15 Sep 2021 01:39:28 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

8 changed files:

Changes:

  • src/base/ftbitmap.c
    ... ... @@ -112,10 +112,10 @@
    112 112
           target_size = (FT_ULong)target_pitch * target->rows;
    
    113 113
     
    
    114 114
           if ( target_size != size )
    
    115
    -        (void)FT_QREALLOC( target->buffer, target_size, size );
    
    115
    +        FT_MEM_QREALLOC( target->buffer, target_size, size );
    
    116 116
         }
    
    117 117
         else
    
    118
    -      (void)FT_QALLOC( target->buffer, size );
    
    118
    +      FT_MEM_QALLOC( target->buffer, size );
    
    119 119
     
    
    120 120
         if ( !error )
    
    121 121
         {
    

  • src/base/ftobjs.c
    ... ... @@ -535,7 +535,7 @@
    535 535
         else
    
    536 536
           slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
    
    537 537
     
    
    538
    -    (void)FT_ALLOC( slot->bitmap.buffer, size );
    
    538
    +    FT_MEM_ALLOC( slot->bitmap.buffer, size );
    
    539 539
         return error;
    
    540 540
       }
    
    541 541
     
    

  • src/bzip2/ftbzip2.c
    ... ... @@ -70,7 +70,7 @@
    70 70
         FT_Pointer  p  = NULL;
    
    71 71
     
    
    72 72
     
    
    73
    -    (void)FT_QALLOC( p, sz );
    
    73
    +    FT_MEM_QALLOC( p, sz );
    
    74 74
         return p;
    
    75 75
       }
    
    76 76
     
    

  • src/cache/ftccache.c
    ... ... @@ -119,7 +119,7 @@
    119 119
           FT_UFast  count = mask + p + 1;    /* number of buckets */
    
    120 120
     
    
    121 121
     
    
    122
    -      /* do we need to shrink the buckets array? */
    
    122
    +      /* do we need to expand the buckets array? */
    
    123 123
           if ( cache->slack < 0 )
    
    124 124
           {
    
    125 125
             FTC_Node  new_list = NULL;
    
    ... ... @@ -135,7 +135,7 @@
    135 135
     
    
    136 136
     
    
    137 137
               /* if we can't expand the array, leave immediately */
    
    138
    -          if ( FT_QRENEW_ARRAY( cache->buckets,
    
    138
    +          if ( FT_RENEW_ARRAY( cache->buckets,
    
    139 139
                                    ( mask + 1 ) * 2, ( mask + 1 ) * 4 ) )
    
    140 140
                 break;
    
    141 141
             }
    
    ... ... @@ -172,7 +172,7 @@
    172 172
               cache->p = p + 1;
    
    173 173
           }
    
    174 174
     
    
    175
    -      /* do we need to expand the buckets array? */
    
    175
    +      /* do we need to shrink the buckets array? */
    
    176 176
           else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
    
    177 177
           {
    
    178 178
             FT_UFast   old_index = p + mask;
    
    ... ... @@ -341,7 +341,7 @@
    341 341
         cache->mask  = FTC_HASH_INITIAL_SIZE - 1;
    
    342 342
         cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
    
    343 343
     
    
    344
    -    (void)FT_QNEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
    
    344
    +    FT_MEM_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
    
    345 345
         return error;
    
    346 346
       }
    
    347 347
     
    

  • src/gzip/ftgzip.c
    ... ... @@ -132,7 +132,7 @@
    132 132
     
    
    133 133
     
    
    134 134
         /* allocate and zero out */
    
    135
    -    (void)FT_ALLOC( p, sz );
    
    135
    +    FT_MEM_ALLOC( p, sz );
    
    136 136
         return p;
    
    137 137
       }
    
    138 138
     
    

  • src/psnames/psmodule.c
    ... ... @@ -389,9 +389,9 @@
    389 389
             /* Reallocate if the number of used entries is much smaller. */
    
    390 390
             if ( count < num_glyphs / 2 )
    
    391 391
             {
    
    392
    -          (void)FT_QRENEW_ARRAY( table->maps,
    
    393
    -                                 num_glyphs + EXTRA_GLYPH_LIST_SIZE,
    
    394
    -                                 count );
    
    392
    +          FT_MEM_QRENEW_ARRAY( table->maps,
    
    393
    +                               num_glyphs + EXTRA_GLYPH_LIST_SIZE,
    
    394
    +                               count );
    
    395 395
               error = FT_Err_Ok;
    
    396 396
             }
    
    397 397
     
    

  • src/sfnt/sfobjs.c
    ... ... @@ -1238,7 +1238,7 @@
    1238 1238
               }
    
    1239 1239
     
    
    1240 1240
               /* reduce array size to the actually used elements */
    
    1241
    -          (void)FT_QRENEW_ARRAY( sbit_strike_map, count, bsize_idx );
    
    1241
    +          FT_MEM_QRENEW_ARRAY( sbit_strike_map, count, bsize_idx );
    
    1242 1242
     
    
    1243 1243
               /* from now on, all strike indices are mapped */
    
    1244 1244
               /* using `sbit_strike_map'                    */
    

  • src/sfnt/ttload.c
    ... ... @@ -993,9 +993,9 @@
    993 993
     
    
    994 994
           /* reduce array size to the actually used elements */
    
    995 995
           count = (FT_UInt)( entry - table->names );
    
    996
    -      (void)FT_QRENEW_ARRAY( table->names,
    
    997
    -                             table->numNameRecords,
    
    998
    -                             count );
    
    996
    +      FT_MEM_QRENEW_ARRAY( table->names,
    
    997
    +                           table->numNameRecords,
    
    998
    +                           count );
    
    999 999
           table->numNameRecords = count;
    
    1000 1000
         }
    
    1001 1001
     
    


  • reply via email to

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