LibGfx: Change Emoji::emoji_for_code_points to accept const code points

Span<u32 const> is the type used when converting a constant Vector<u32>
to a Span.
This commit is contained in:
Timothy Flynn 2022-09-14 12:16:59 -04:00 committed by Andreas Kling
parent 35b74ebbfc
commit 98f99a9f7e
Notes: sideshowbarker 2024-07-17 16:23:06 +09:00
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ Bitmap const* Emoji::emoji_for_code_point(u32 code_point)
return emoji_for_code_points(Array { code_point });
}
Bitmap const* Emoji::emoji_for_code_points(Span<u32> const& code_points)
Bitmap const* Emoji::emoji_for_code_points(Span<u32 const> const& code_points)
{
// FIXME: This function is definitely not fast.
auto basename = String::join('_', code_points, "U+{:X}"sv);

View File

@ -17,7 +17,7 @@ class Bitmap;
class Emoji {
public:
static Gfx::Bitmap const* emoji_for_code_point(u32 code_point);
static Gfx::Bitmap const* emoji_for_code_points(Span<u32> const&);
static Gfx::Bitmap const* emoji_for_code_points(Span<u32 const> const&);
static Gfx::Bitmap const* emoji_for_code_point_iterator(Utf8CodePointIterator&);
};