mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
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:
parent
984a2c314b
commit
5455ecf650
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue