mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:57:44 +00:00
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
This commit is contained in:
parent
1c92e6ee9d
commit
63b11030f0
102 changed files with 206 additions and 206 deletions
|
@ -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> const& code_points)
|
||||
Bitmap const* Emoji::emoji_for_code_points(ReadonlySpan<u32> const& code_points)
|
||||
{
|
||||
// FIXME: This function is definitely not fast.
|
||||
auto basename = DeprecatedString::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> const&);
|
||||
static Gfx::Bitmap const* emoji_for_code_points(ReadonlySpan<u32> const&);
|
||||
static Gfx::Bitmap const* emoji_for_code_point_iterator(Utf8CodePointIterator&);
|
||||
};
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ Optional<i16> Kern::read_glyph_kerning_format0(ReadonlyBytes slice, u16 left_gly
|
|||
return {};
|
||||
|
||||
// FIXME: implement a possibly slightly more efficient binary search using the parameters above
|
||||
Span<Format0Pair const> pairs { bit_cast<Format0Pair const*>(slice.slice(sizeof(Format0)).data()), number_of_pairs };
|
||||
ReadonlySpan<Format0Pair> pairs { bit_cast<Format0Pair const*>(slice.slice(sizeof(Format0)).data()), number_of_pairs };
|
||||
|
||||
// The left and right halves of the kerning pair make an unsigned 32-bit number, which is then used to order the kerning pairs numerically.
|
||||
auto needle = (static_cast<u32>(left_glyph_id) << 16u) | static_cast<u32>(right_glyph_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue