summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibLocale
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-02-05 19:02:54 +0000
committerLinus Groh <mail@linusgroh.de>2023-02-08 19:15:45 +0000
commit63b11030f03e5a0fd06d9c8cfa788da0388096d8 (patch)
tree3ea0fa1e751683b643c71da95b6ecf98a97508cf /Userland/Libraries/LibLocale
parent1c92e6ee9d1f686f20f37445150d63ae474b7e9b (diff)
downloadserenity-63b11030f03e5a0fd06d9c8cfa788da0388096d8.zip
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
Diffstat (limited to 'Userland/Libraries/LibLocale')
-rw-r--r--Userland/Libraries/LibLocale/Locale.cpp16
-rw-r--r--Userland/Libraries/LibLocale/Locale.h16
-rw-r--r--Userland/Libraries/LibLocale/NumberFormat.cpp2
-rw-r--r--Userland/Libraries/LibLocale/NumberFormat.h2
-rw-r--r--Userland/Libraries/LibLocale/PluralRules.cpp2
-rw-r--r--Userland/Libraries/LibLocale/PluralRules.h2
6 files changed, 20 insertions, 20 deletions
diff --git a/Userland/Libraries/LibLocale/Locale.cpp b/Userland/Libraries/LibLocale/Locale.cpp
index 0053913d46..4cd7a7b54d 100644
--- a/Userland/Libraries/LibLocale/Locale.cpp
+++ b/Userland/Libraries/LibLocale/Locale.cpp
@@ -786,14 +786,14 @@ StringView style_to_string(Style style)
}
}
-Span<StringView const> __attribute__((weak)) get_available_keyword_values(StringView) { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_calendars() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_collation_case_orderings() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_collation_numeric_orderings() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_collation_types() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_currencies() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_hour_cycles() { return {}; }
-Span<StringView const> __attribute__((weak)) get_available_number_systems() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_keyword_values(StringView) { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_calendars() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_collation_case_orderings() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_collation_numeric_orderings() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_collation_types() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_currencies() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_hour_cycles() { return {}; }
+ReadonlySpan<StringView> __attribute__((weak)) get_available_number_systems() { return {}; }
Optional<Locale> __attribute__((weak)) locale_from_string(StringView) { return {}; }
Optional<Language> __attribute__((weak)) language_from_string(StringView) { return {}; }
Optional<Territory> __attribute__((weak)) territory_from_string(StringView) { return {}; }
diff --git a/Userland/Libraries/LibLocale/Locale.h b/Userland/Libraries/LibLocale/Locale.h
index 8cae475773..28dec294eb 100644
--- a/Userland/Libraries/LibLocale/Locale.h
+++ b/Userland/Libraries/LibLocale/Locale.h
@@ -146,14 +146,14 @@ ErrorOr<Optional<String>> canonicalize_unicode_locale_id(LocaleID&);
StringView default_locale();
bool is_locale_available(StringView locale);
-Span<StringView const> get_available_keyword_values(StringView key);
-Span<StringView const> get_available_calendars();
-Span<StringView const> get_available_collation_case_orderings();
-Span<StringView const> get_available_collation_numeric_orderings();
-Span<StringView const> get_available_collation_types();
-Span<StringView const> get_available_currencies();
-Span<StringView const> get_available_hour_cycles();
-Span<StringView const> get_available_number_systems();
+ReadonlySpan<StringView> get_available_keyword_values(StringView key);
+ReadonlySpan<StringView> get_available_calendars();
+ReadonlySpan<StringView> get_available_collation_case_orderings();
+ReadonlySpan<StringView> get_available_collation_numeric_orderings();
+ReadonlySpan<StringView> get_available_collation_types();
+ReadonlySpan<StringView> get_available_currencies();
+ReadonlySpan<StringView> get_available_hour_cycles();
+ReadonlySpan<StringView> get_available_number_systems();
Style style_from_string(StringView style);
StringView style_to_string(Style style);
diff --git a/Userland/Libraries/LibLocale/NumberFormat.cpp b/Userland/Libraries/LibLocale/NumberFormat.cpp
index 5de4905020..3bd65e0c1c 100644
--- a/Userland/Libraries/LibLocale/NumberFormat.cpp
+++ b/Userland/Libraries/LibLocale/NumberFormat.cpp
@@ -22,7 +22,7 @@ ErrorOr<Optional<NumberFormat>> __attribute__((weak)) get_standard_number_system
ErrorOr<Vector<NumberFormat>> __attribute__((weak)) get_compact_number_system_formats(StringView, StringView, CompactNumberFormatType) { return Vector<NumberFormat> {}; }
ErrorOr<Vector<NumberFormat>> __attribute__((weak)) get_unit_formats(StringView, StringView, Style) { return Vector<NumberFormat> {}; }
-Optional<Span<u32 const>> __attribute__((weak)) get_digits_for_number_system(StringView)
+Optional<ReadonlySpan<u32>> __attribute__((weak)) get_digits_for_number_system(StringView)
{
// Fall back to "latn" digits when Unicode data generation is disabled.
constexpr Array<u32, 10> digits { { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 } };
diff --git a/Userland/Libraries/LibLocale/NumberFormat.h b/Userland/Libraries/LibLocale/NumberFormat.h
index 2c40532dfc..62bec6d48a 100644
--- a/Userland/Libraries/LibLocale/NumberFormat.h
+++ b/Userland/Libraries/LibLocale/NumberFormat.h
@@ -64,7 +64,7 @@ enum class NumericSymbol : u8 {
ErrorOr<Optional<StringView>> get_number_system_symbol(StringView locale, StringView system, NumericSymbol symbol);
ErrorOr<Optional<NumberGroupings>> get_number_system_groupings(StringView locale, StringView system);
-Optional<Span<u32 const>> get_digits_for_number_system(StringView system);
+Optional<ReadonlySpan<u32>> get_digits_for_number_system(StringView system);
ErrorOr<String> replace_digits_for_number_system(StringView system, StringView number);
ErrorOr<Optional<NumberFormat>> get_standard_number_system_format(StringView locale, StringView system, StandardNumberFormatType type);
diff --git a/Userland/Libraries/LibLocale/PluralRules.cpp b/Userland/Libraries/LibLocale/PluralRules.cpp
index 1f56f6cbe7..9c36df4f76 100644
--- a/Userland/Libraries/LibLocale/PluralRules.cpp
+++ b/Userland/Libraries/LibLocale/PluralRules.cpp
@@ -34,7 +34,7 @@ PluralCategory __attribute__((weak)) determine_plural_category(StringView, Plura
return PluralCategory::Other;
}
-Span<PluralCategory const> __attribute__((weak)) available_plural_categories(StringView, PluralForm)
+ReadonlySpan<PluralCategory> __attribute__((weak)) available_plural_categories(StringView, PluralForm)
{
static constexpr Array<PluralCategory, 1> categories { { PluralCategory::Other } };
return categories.span();
diff --git a/Userland/Libraries/LibLocale/PluralRules.h b/Userland/Libraries/LibLocale/PluralRules.h
index 0f93234b7f..62c948833c 100644
--- a/Userland/Libraries/LibLocale/PluralRules.h
+++ b/Userland/Libraries/LibLocale/PluralRules.h
@@ -118,7 +118,7 @@ constexpr StringView plural_category_to_string(PluralCategory category)
}
PluralCategory determine_plural_category(StringView locale, PluralForm form, PluralOperands operands);
-Span<PluralCategory const> available_plural_categories(StringView locale, PluralForm form);
+ReadonlySpan<PluralCategory> available_plural_categories(StringView locale, PluralForm form);
PluralCategory determine_plural_range(StringView locale, PluralCategory start, PluralCategory end);
}