LibGfx: Remove OpenType::Font::m_buffer

At first glance this looks like it holds the memory that the various
slices point into... but it actually doesn't own that memory. Nobody
uses m_buffer, so it serves no purpose.
This commit is contained in:
Sam Atkins 2023-10-21 16:57:50 +01:00 committed by Andreas Kling
parent 984a2c314b
commit 5455ecf650
2 changed files with 1 additions and 6 deletions

View file

@ -278,7 +278,6 @@ ErrorOr<NonnullRefPtr<Font>> Font::try_load_from_offset(ReadonlyBytes buffer, u3
}
return adopt_ref(*new Font(
move(buffer),
move(head),
move(name),
move(hhea),

View file

@ -82,7 +82,6 @@ private:
static ErrorOr<NonnullRefPtr<Font>> try_load_from_offset(ReadonlyBytes, unsigned index = 0);
Font(
ReadonlyBytes bytes,
Head&& head,
Name&& name,
Hhea&& hhea,
@ -98,8 +97,7 @@ private:
Optional<CBLC> cblc,
Optional<CBDT> cbdt,
Optional<GPOS> gpos)
: m_buffer(move(bytes))
, m_head(move(head))
: m_head(move(head))
, m_name(move(name))
, m_hhea(move(hhea))
, m_maxp(move(maxp))
@ -119,8 +117,6 @@ private:
RefPtr<Core::Resource> m_resource;
ReadonlyBytes m_buffer;
// These are stateful wrappers around non-owning slices
Head m_head;
Name m_name;