mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
LibJS: Make get_string_or_number_option() options Object a const&
This only passes the options Object to get_option(), which now takes a const reference.
This commit is contained in:
parent
c099b1b8a5
commit
a422ea8792
Notes:
sideshowbarker
2024-07-18 04:21:31 +09:00
Author: https://github.com/linusg
Commit: a422ea8792
Pull-request: https://github.com/SerenityOS/serenity/pull/9918
Reviewed-by: https://github.com/IdanHo ✅
2 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ Value get_option(GlobalObject& global_object, Object const& options, PropertyNam
|
|||
|
||||
// 13.4 GetStringOrNumberOption ( options, property, stringValues, minimum, maximum, fallback ), https://tc39.es/proposal-temporal/#sec-getstringornumberoption
|
||||
template<typename NumberType>
|
||||
Optional<Variant<String, NumberType>> get_string_or_number_option(GlobalObject& global_object, Object& options, PropertyName const& property, Vector<StringView> const& string_values, NumberType minimum, NumberType maximum, Value fallback)
|
||||
Optional<Variant<String, NumberType>> get_string_or_number_option(GlobalObject& global_object, Object const& options, PropertyName const& property, Vector<StringView> const& string_values, NumberType minimum, NumberType maximum, Value fallback)
|
||||
{
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ MarkedValueList iterable_to_list_of_type(GlobalObject&, Value items, Vector<Opti
|
|||
Object* get_options_object(GlobalObject&, Value options);
|
||||
Value get_option(GlobalObject&, Object const& options, PropertyName const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback);
|
||||
template<typename NumberType>
|
||||
Optional<Variant<String, NumberType>> get_string_or_number_option(GlobalObject&, Object& options, PropertyName const& property, Vector<StringView> const& string_values, NumberType minimum, NumberType maximum, Value fallback);
|
||||
Optional<Variant<String, NumberType>> get_string_or_number_option(GlobalObject&, Object const& options, PropertyName const& property, Vector<StringView> const& string_values, NumberType minimum, NumberType maximum, Value fallback);
|
||||
Optional<String> to_temporal_overflow(GlobalObject&, Object& normalized_options);
|
||||
Optional<String> to_temporal_rounding_mode(GlobalObject&, Object& normalized_options, String const& fallback);
|
||||
Optional<String> to_show_calendar_option(GlobalObject&, Object& normalized_options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue