diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-09 21:38:14 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-09 23:46:45 +0100 |
commit | a422ea8792747d8f1a7041f0e65ab7ddcdc13422 (patch) | |
tree | 66488301733f0a507613e411fb425b736f963bf7 /Userland/Libraries | |
parent | c099b1b8a565b0f74ddf56c161f52de4b52aecec (diff) | |
download | serenity-a422ea8792747d8f1a7041f0e65ab7ddcdc13422.zip |
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index 04e8d3d058..23d0761272 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -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(); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h index deed584a0b..3904ed0e3e 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h @@ -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); |