mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
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:
parent
35b74ebbfc
commit
98f99a9f7e
Notes:
sideshowbarker
2024-07-17 16:23:06 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/98f99a9f7e Pull-request: https://github.com/SerenityOS/serenity/pull/15245
@ -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);
|
||||
|
@ -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&);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user