Commit 49eac0da0c2cfb99c63aff556855eaad3555170d

Alexei Podtelezhnikov 2023-03-03T22:10:50

[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`.

diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 14f2ec3..48cf27e 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 3db8f0a..8ef17c6 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 ) )