LibGfx: Store Core::Resources in RefPtr to const

This commit is contained in:
Andrew Kaster 2025-04-15 15:46:22 -06:00
commit ae9c28d7d6
2 changed files with 4 additions and 4 deletions

View file

@ -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))
{
}

View file

@ -19,10 +19,10 @@ public:
ReadonlyBytes bytes() const;
private:
FontData(ByteBuffer&& byte_buffer);
FontData(NonnullRefPtr<Core::Resource> resource);
explicit FontData(ByteBuffer&& byte_buffer);
explicit FontData(NonnullRefPtr<Core::Resource const> resource);
Variant<ByteBuffer, NonnullRefPtr<Core::Resource>> m_data;
Variant<ByteBuffer, NonnullRefPtr<Core::Resource const>> m_data;
};
}