mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:37:44 +00:00
LibJS: Replace comparisons of "0"_bigint with SignedBigInteger::is_zero
This just avoids creating UnsignedBigInteger's underlying vector.
This commit is contained in:
parent
440d185666
commit
a712c7b5e1
4 changed files with 4 additions and 4 deletions
|
@ -452,7 +452,7 @@ ThrowCompletionOr<NanosecondsToDaysResult> nanoseconds_to_days(GlobalObject& glo
|
|||
auto day_length_ns = ns_per_day_bigint;
|
||||
|
||||
// 2. If nanoseconds = 0, then
|
||||
if (nanoseconds == "0"_bigint) {
|
||||
if (nanoseconds.is_zero()) {
|
||||
// a. Return the Record { [[Days]]: 0, [[Nanoseconds]]: 0, [[DayLength]]: dayLengthNs }.
|
||||
return NanosecondsToDaysResult { .days = 0, .nanoseconds = "0"_sbigint, .day_length = day_length_ns.to_double() };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue