diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-09 22:16:42 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-09 23:46:45 +0100 |
commit | 4bba61fd592a24609bc06742731e08001955090b (patch) | |
tree | e36092008adbbbd03a16cb9e92e6302cda34d846 /Userland/Libraries/LibJS/Runtime | |
parent | 1f995381850e422943f0fcf045d9b9faeb2e06de (diff) | |
download | serenity-4bba61fd592a24609bc06742731e08001955090b.zip |
LibJS: Make resolve_iso_month() fields Object a const&
This only calls Object::get() on the fields Object, which is
const-qualified.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp index 95c885384c..2301017b29 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.cpp @@ -732,7 +732,7 @@ String build_iso_month_code(u8 month) } // 12.1.37 ResolveISOMonth ( fields ), https://tc39.es/proposal-temporal/#sec-temporal-resolveisomonth -double resolve_iso_month(GlobalObject& global_object, Object& fields) +double resolve_iso_month(GlobalObject& global_object, Object const& fields) { auto& vm = global_object.vm(); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h index d2ed6df29a..0f592e6c44 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Calendar.h @@ -64,7 +64,7 @@ u8 to_iso_day_of_week(i32 year, u8 month, u8 day); u16 to_iso_day_of_year(i32 year, u8 month, u8 day); u8 to_iso_week_of_year(i32 year, u8 month, u8 day); String build_iso_month_code(u8 month); -double resolve_iso_month(GlobalObject&, Object& fields); +double resolve_iso_month(GlobalObject&, Object const& fields); Optional<ISODate> iso_date_from_fields(GlobalObject&, Object const& fields, Object const& options); Optional<ISOYearMonth> iso_year_month_from_fields(GlobalObject&, Object const& fields, Object const& options); Optional<ISOMonthDay> iso_month_day_from_fields(GlobalObject&, Object const& fields, Object const& options); |