freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * src/autofit/afglobal.c (af_face_globa


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/autofit/afglobal.c (af_face_globals_new): Reduce zeroing.
Date: Tue, 18 Jan 2022 19:11:15 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/autofit/afglobal.c
    ... ... @@ -337,11 +337,13 @@
    337 337
     
    
    338 338
         /* we allocate an AF_FaceGlobals structure together */
    
    339 339
         /* with the glyph_styles array                      */
    
    340
    -    if ( FT_ALLOC( globals,
    
    341
    -                   sizeof ( *globals ) +
    
    342
    -                     (FT_ULong)face->num_glyphs * sizeof ( FT_UShort ) ) )
    
    340
    +    if ( FT_QALLOC( globals,
    
    341
    +                    sizeof ( *globals ) +
    
    342
    +                      (FT_ULong)face->num_glyphs * sizeof ( FT_UShort ) ) )
    
    343 343
           goto Exit;
    
    344 344
     
    
    345
    +    FT_ZERO( &globals->metrics );
    
    346
    +
    
    345 347
         globals->face                      = face;
    
    346 348
         globals->glyph_count               = face->num_glyphs;
    
    347 349
         /* right after the globals structure come the glyph styles */
    


  • reply via email to

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