mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +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
|
@ -23,7 +23,7 @@ Optional<DeprecatedString> __attribute__((weak)) code_point_display_name(u32) {
|
|||
Optional<StringView> __attribute__((weak)) code_point_block_display_name(u32) { return {}; }
|
||||
Optional<StringView> __attribute__((weak)) code_point_abbreviation(u32) { return {}; }
|
||||
u32 __attribute__((weak)) canonical_combining_class(u32) { return {}; }
|
||||
Span<BlockName const> __attribute__((weak)) block_display_names() { return {}; }
|
||||
ReadonlySpan<BlockName> __attribute__((weak)) block_display_names() { return {}; }
|
||||
|
||||
u32 __attribute__((weak)) to_unicode_lowercase(u32 code_point)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ Optional<DeprecatedString> code_point_display_name(u32 code_point);
|
|||
Optional<StringView> code_point_block_display_name(u32 code_point);
|
||||
Optional<StringView> code_point_abbreviation(u32 code_point);
|
||||
|
||||
Span<BlockName const> block_display_names();
|
||||
ReadonlySpan<BlockName> block_display_names();
|
||||
|
||||
u32 canonical_combining_class(u32 code_point);
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
namespace Unicode {
|
||||
|
||||
Optional<Emoji> __attribute__((weak)) find_emoji_for_code_points(Span<u32 const>) { return {}; }
|
||||
Optional<Emoji> __attribute__((weak)) find_emoji_for_code_points(ReadonlySpan<u32>) { return {}; }
|
||||
|
||||
}
|
||||
|
|
|
@ -34,15 +34,15 @@ struct Emoji {
|
|||
StringView name;
|
||||
EmojiGroup group { EmojiGroup::Unknown };
|
||||
u32 display_order { 0 };
|
||||
Span<u32 const> code_points;
|
||||
ReadonlySpan<u32> code_points;
|
||||
};
|
||||
|
||||
Optional<Emoji> find_emoji_for_code_points(Span<u32 const> code_points);
|
||||
Optional<Emoji> find_emoji_for_code_points(ReadonlySpan<u32> code_points);
|
||||
|
||||
template<size_t Size>
|
||||
Optional<Emoji> find_emoji_for_code_points(u32 const (&code_points)[Size])
|
||||
{
|
||||
return find_emoji_for_code_points(Span<u32 const> { code_points });
|
||||
return find_emoji_for_code_points(ReadonlySpan<u32> { code_points });
|
||||
}
|
||||
|
||||
constexpr StringView emoji_group_to_string(EmojiGroup group)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue