mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57: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
|
@ -97,7 +97,7 @@ ThrowCompletionOr<Object*> get_options_object(VM& vm, Value options)
|
|||
}
|
||||
|
||||
// 13.3 GetOption ( options, property, type, values, fallback ), https://tc39.es/proposal-temporal/#sec-getoption
|
||||
ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey const& property, OptionType type, Span<StringView const> values, OptionDefault const& default_)
|
||||
ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey const& property, OptionType type, ReadonlySpan<StringView> values, OptionDefault const& default_)
|
||||
{
|
||||
VERIFY(property.is_string());
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ using TemporalUnitDefault = Variant<TemporalUnitRequired, Optional<StringView>>;
|
|||
|
||||
ThrowCompletionOr<MarkedVector<Value>> iterable_to_list_of_type(VM&, Value items, Vector<OptionType> const& element_types);
|
||||
ThrowCompletionOr<Object*> get_options_object(VM&, Value options);
|
||||
ThrowCompletionOr<Value> get_option(VM&, Object const& options, PropertyKey const& property, OptionType type, Span<StringView const> values, OptionDefault const&);
|
||||
ThrowCompletionOr<Value> get_option(VM&, Object const& options, PropertyKey const& property, OptionType type, ReadonlySpan<StringView> values, OptionDefault const&);
|
||||
ThrowCompletionOr<String> to_temporal_overflow(VM&, Object const* options);
|
||||
ThrowCompletionOr<String> to_temporal_disambiguation(VM&, Object const* options);
|
||||
ThrowCompletionOr<String> to_temporal_rounding_mode(VM&, Object const& normalized_options, StringView fallback);
|
||||
|
@ -181,7 +181,7 @@ ThrowCompletionOr<DifferenceSettings> get_difference_settings(VM&, DifferenceOpe
|
|||
template<size_t Size>
|
||||
ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey const& property, OptionType type, StringView const (&values)[Size], OptionDefault const& default_)
|
||||
{
|
||||
return get_option(vm, options, property, type, Span<StringView const> { values }, default_);
|
||||
return get_option(vm, options, property, type, ReadonlySpan<StringView> { values }, default_);
|
||||
}
|
||||
|
||||
// 13.40 ToIntegerWithTruncation ( argument ), https://tc39.es/proposal-temporal/#sec-tointegerwithtruncation
|
||||
|
|
|
@ -50,7 +50,7 @@ bool is_builtin_calendar(StringView identifier)
|
|||
}
|
||||
|
||||
// 12.1.2 AvailableCalendars ( ), https://tc39.es/proposal-temporal/#sec-temporal-availablecalendars
|
||||
Span<StringView const> available_calendars()
|
||||
ReadonlySpan<StringView> available_calendars()
|
||||
{
|
||||
// 1. Let calendars be the List of String values representing calendar types supported by the implementation.
|
||||
// NOTE: This can be removed in favor of using `Unicode::get_available_calendars()` once everything is updated to handle non-iso8601 calendars.
|
||||
|
|
|
@ -38,7 +38,7 @@ struct YearWeekRecord {
|
|||
};
|
||||
|
||||
bool is_builtin_calendar(StringView identifier);
|
||||
Span<StringView const> available_calendars();
|
||||
ReadonlySpan<StringView> available_calendars();
|
||||
ThrowCompletionOr<Calendar*> create_temporal_calendar(VM&, String const& identifier, FunctionObject const* new_target = nullptr);
|
||||
ThrowCompletionOr<Calendar*> get_builtin_calendar(VM&, String const& identifier);
|
||||
Calendar* get_iso8601_calendar(VM&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue