mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +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
|
@ -446,7 +446,7 @@ static ALWAYS_INLINE bool is_zero(Value number)
|
|||
{
|
||||
if (number.is_number())
|
||||
return number.as_double() == 0.0;
|
||||
return number.as_bigint().big_integer() == Crypto::SignedBigInteger::create_from(0);
|
||||
return number.as_bigint().big_integer().is_zero();
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE bool is_greater_than(Value number, i64 rhs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue