mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
LibGfx: Store Core::Resources in RefPtr to const
This commit is contained in:
parent
d1f6f5649e
commit
ffd0259bef
|
|
@ -32,7 +32,7 @@ FontData::FontData(ByteBuffer&& byte_buffer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FontData::FontData(NonnullRefPtr<Core::Resource> resource)
|
FontData::FontData(NonnullRefPtr<Core::Resource const> resource)
|
||||||
: m_data(move(resource))
|
: m_data(move(resource))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ public:
|
||||||
ReadonlyBytes bytes() const;
|
ReadonlyBytes bytes() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FontData(ByteBuffer&& byte_buffer);
|
explicit FontData(ByteBuffer&& byte_buffer);
|
||||||
FontData(NonnullRefPtr<Core::Resource> resource);
|
explicit FontData(NonnullRefPtr<Core::Resource const> resource);
|
||||||
|
|
||||||
Variant<ByteBuffer, NonnullRefPtr<Core::Resource>> m_data;
|
Variant<ByteBuffer, NonnullRefPtr<Core::Resource const>> m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user