mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
Everywhere: Pass AK::StringView by value
This commit is contained in:
parent
ad5d217e76
commit
8b1108e485
392 changed files with 978 additions and 978 deletions
|
@ -126,7 +126,7 @@ struct UnicodeData {
|
|||
NormalizationProps normalization_props;
|
||||
};
|
||||
|
||||
static Vector<u32> parse_code_point_list(StringView const& list)
|
||||
static Vector<u32> parse_code_point_list(StringView list)
|
||||
{
|
||||
Vector<u32> code_points;
|
||||
|
||||
|
@ -137,7 +137,7 @@ static Vector<u32> parse_code_point_list(StringView const& list)
|
|||
return code_points;
|
||||
}
|
||||
|
||||
static CodePointRange parse_code_point_range(StringView const& list)
|
||||
static CodePointRange parse_code_point_range(StringView list)
|
||||
{
|
||||
CodePointRange code_point_range {};
|
||||
|
||||
|
@ -532,14 +532,14 @@ u32 simple_lowercase_mapping(u32 code_point);
|
|||
Span<SpecialCasing const* const> special_case_mapping(u32 code_point);
|
||||
|
||||
bool code_point_has_general_category(u32 code_point, GeneralCategory general_category);
|
||||
Optional<GeneralCategory> general_category_from_string(StringView const& general_category);
|
||||
Optional<GeneralCategory> general_category_from_string(StringView general_category);
|
||||
|
||||
bool code_point_has_property(u32 code_point, Property property);
|
||||
Optional<Property> property_from_string(StringView const& property);
|
||||
Optional<Property> property_from_string(StringView property);
|
||||
|
||||
bool code_point_has_script(u32 code_point, Script script);
|
||||
bool code_point_has_script_extension(u32 code_point, Script script);
|
||||
Optional<Script> script_from_string(StringView const& script);
|
||||
Optional<Script> script_from_string(StringView script);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -660,32 +660,32 @@ namespace Unicode {
|
|||
generator.append(R"~~~(
|
||||
namespace Detail {
|
||||
|
||||
Optional<Locale> locale_from_string(StringView const& locale);
|
||||
Optional<Locale> locale_from_string(StringView locale);
|
||||
|
||||
Optional<StringView> get_locale_language_mapping(StringView locale, StringView language);
|
||||
Optional<Language> language_from_string(StringView const& language);
|
||||
Optional<StringView> resolve_language_alias(StringView const& language);
|
||||
Optional<Language> language_from_string(StringView language);
|
||||
Optional<StringView> resolve_language_alias(StringView language);
|
||||
|
||||
Optional<StringView> get_locale_territory_mapping(StringView locale, StringView territory);
|
||||
Optional<Territory> territory_from_string(StringView const& territory);
|
||||
Optional<StringView> resolve_territory_alias(StringView const& territory);
|
||||
Optional<Territory> territory_from_string(StringView territory);
|
||||
Optional<StringView> resolve_territory_alias(StringView territory);
|
||||
|
||||
Optional<StringView> get_locale_script_tag_mapping(StringView locale, StringView script_tag);
|
||||
Optional<ScriptTag> script_tag_from_string(StringView const& script_tag);
|
||||
Optional<StringView> resolve_script_tag_alias(StringView const& script_tag);
|
||||
Optional<ScriptTag> script_tag_from_string(StringView script_tag);
|
||||
Optional<StringView> resolve_script_tag_alias(StringView script_tag);
|
||||
|
||||
Optional<StringView> get_locale_currency_mapping(StringView locale, StringView currency);
|
||||
Optional<Currency> currency_from_string(StringView const& currency);
|
||||
Optional<Currency> currency_from_string(StringView currency);
|
||||
|
||||
Optional<StringView> get_locale_key_mapping(StringView locale, StringView key);
|
||||
Optional<Key> key_from_string(StringView const& key);
|
||||
Optional<Key> key_from_string(StringView key);
|
||||
|
||||
Optional<ListPatterns> get_locale_list_pattern_mapping(StringView locale, StringView list_pattern_type, StringView list_pattern_style);
|
||||
Optional<ListPatternType> list_pattern_type_from_string(StringView const& list_pattern_type);
|
||||
Optional<ListPatternStyle> list_pattern_style_from_string(StringView const& list_pattern_style);
|
||||
Optional<ListPatternType> list_pattern_type_from_string(StringView list_pattern_type);
|
||||
Optional<ListPatternStyle> list_pattern_style_from_string(StringView list_pattern_style);
|
||||
|
||||
Optional<StringView> resolve_variant_alias(StringView const& variant);
|
||||
Optional<StringView> resolve_subdivision_alias(StringView const& subdivision);
|
||||
Optional<StringView> resolve_variant_alias(StringView variant);
|
||||
Optional<StringView> resolve_subdivision_alias(StringView subdivision);
|
||||
|
||||
void resolve_complex_language_aliases(Unicode::LanguageID& language_id);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void generate_value_from_string(SourceGenerator& generator, StringView method_na
|
|||
generator.set("size", String::number(hashes.size()));
|
||||
|
||||
generator.append(R"~~~(
|
||||
Optional<@return_type@> @method_name@(StringView const& key)
|
||||
Optional<@return_type@> @method_name@(StringView key)
|
||||
{
|
||||
constexpr Array<HashValuePair<@value_type@>, @size@> hash_pairs { {
|
||||
)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue