1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:17:44 +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:
Linus Groh 2021-09-08 21:29:20 +01:00
parent 9c3da7a3e3
commit 81aaa9ccd5
11 changed files with 23 additions and 23 deletions

View file

@ -39,7 +39,7 @@ struct ISOYearMonth {
u8 reference_iso_day;
};
Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, String const& overflow);
Optional<ISOYearMonth> regulate_iso_year_month(GlobalObject&, double year, double month, StringView overflow);
bool is_valid_iso_month(u8 month);
bool iso_year_month_within_limits(i32 year, u8 month);
ISOYearMonth balance_iso_year_month(double year, double month);