mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
LibJS: Make get_option() options Object a const&
This only calls Object::get() on the options Object, which is const-qualified.
This commit is contained in:
parent
5ae6ad8557
commit
c099b1b8a5
|
@ -103,7 +103,7 @@ Object* get_options_object(GlobalObject& global_object, Value options)
|
|||
}
|
||||
|
||||
// 13.3 GetOption ( options, property, types, values, fallback ), https://tc39.es/proposal-temporal/#sec-getoption
|
||||
Value get_option(GlobalObject& global_object, Object& options, PropertyName const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback)
|
||||
Value get_option(GlobalObject& global_object, Object const& options, PropertyName const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback)
|
||||
{
|
||||
VERIFY(property.is_string());
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ struct SecondsStringPrecision {
|
|||
|
||||
MarkedValueList iterable_to_list_of_type(GlobalObject&, Value items, Vector<OptionType> const& element_types);
|
||||
Object* get_options_object(GlobalObject&, Value options);
|
||||
Value get_option(GlobalObject&, Object& options, PropertyName const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback);
|
||||
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<String> to_temporal_overflow(GlobalObject&, Object& normalized_options);
|
||||
|
|
Loading…
Reference in a new issue