diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-09-14 12:16:59 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-16 15:20:59 +0200 |
commit | 98f99a9f7e2911e844e184494958bc6f4f6048ab (patch) | |
tree | f5705c70bcaf74b9f9103eecba9c2caf366e7cd1 /Userland/Libraries/LibGfx | |
parent | 35b74ebbfcfda4a8e1855538f77422f868ed5123 (diff) | |
download | serenity-98f99a9f7e2911e844e184494958bc6f4f6048ab.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r-- | Userland/Libraries/LibGfx/Font/Emoji.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/Font/Emoji.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Font/Emoji.cpp b/Userland/Libraries/LibGfx/Font/Emoji.cpp index 882517d9a6..c570b9efd5 100644 --- a/Userland/Libraries/LibGfx/Font/Emoji.cpp +++ b/Userland/Libraries/LibGfx/Font/Emoji.cpp @@ -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); diff --git a/Userland/Libraries/LibGfx/Font/Emoji.h b/Userland/Libraries/LibGfx/Font/Emoji.h index 804d7e4680..521908a696 100644 --- a/Userland/Libraries/LibGfx/Font/Emoji.h +++ b/Userland/Libraries/LibGfx/Font/Emoji.h @@ -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&); }; |