From 49eac0da0c2cfb99c63aff556855eaad3555170d Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 3 Mar 2023 22:10:50 -0500 Subject: [PATCH] [pfr] Shorten de-referencing. * src/pfr/pfrobjs.c (pfr_face_done, pfr_face_init): Use closer `memory`. * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove `loader`. --- src/pfr/pfrgload.c | 3 +-- src/pfr/pfrobjs.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index 14f2ec377..48cf27ec8 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -560,8 +560,7 @@ FT_Byte* limit ) { FT_Error error = FT_Err_Ok; - FT_GlyphLoader loader = glyph->loader; - FT_Memory memory = loader->memory; + FT_Memory memory = glyph->loader->memory; PFR_SubGlyph subglyph; FT_UInt flags, i, count, org_count; FT_Int x_pos, y_pos; diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index 3db8f0a06..8ef17c663 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -50,14 +50,14 @@ if ( !face ) return; - memory = pfrface->driver->root.memory; + memory = pfrface->memory; /* we don't want dangling pointers */ pfrface->family_name = NULL; pfrface->style_name = NULL; /* finalize the physical font record */ - pfr_phy_font_done( &face->phy_font, FT_FACE_MEMORY( face ) ); + pfr_phy_font_done( &face->phy_font, memory ); /* no need to finalize the logical font or the header */ FT_FREE( pfrface->available_sizes ); @@ -214,7 +214,7 @@ FT_UInt n, count = phy_font->num_strikes; FT_Bitmap_Size* size; PFR_Strike strike; - FT_Memory memory = pfrface->stream->memory; + FT_Memory memory = pfrface->memory; if ( FT_QNEW_ARRAY( pfrface->available_sizes, count ) )