mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
LibJS: Replace String const& with StringView in various Temporal AOs
This is especially helpful where we already pass StringView literals and only compare them with others, e.g. overflow and largest/smallest unit, in which case there's no need to actually allocate a string.
This commit is contained in:
parent
9c3da7a3e3
commit
81aaa9ccd5
11 changed files with 23 additions and 23 deletions
|
@ -42,12 +42,12 @@ struct ISODate {
|
|||
|
||||
PlainDate* create_temporal_date(GlobalObject&, i32 iso_year, u8 iso_month, u8 iso_day, Object& calendar, FunctionObject* new_target = nullptr);
|
||||
PlainDate* to_temporal_date(GlobalObject&, Value item, Object* options = nullptr);
|
||||
Optional<ISODate> regulate_iso_date(GlobalObject&, double year, double month, double day, String const& overflow);
|
||||
Optional<ISODate> regulate_iso_date(GlobalObject&, double year, double month, double day, StringView overflow);
|
||||
bool is_valid_iso_date(i32 year, u8 month, u8 day);
|
||||
ISODate balance_iso_date(double year, double month, double day);
|
||||
String pad_iso_year(i32 y);
|
||||
Optional<String> temporal_date_to_string(GlobalObject&, PlainDate&, StringView show_calendar);
|
||||
Optional<ISODate> add_iso_date(GlobalObject&, i32 year, u8 month, u8 day, double years, double months, double weeks, double days, String const& overflow);
|
||||
Optional<ISODate> add_iso_date(GlobalObject&, i32 year, u8 month, u8 day, double years, double months, double weeks, double days, StringView overflow);
|
||||
i8 compare_iso_date(i32 year1, u8 month1, u8 day1, i32 year2, u8 month2, u8 day2);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue