mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
LibJS: Reuse as_i32 in as_double in JS::Value
Since this might be complicated with NaN boxing keeping it as one implementation makes this easier to check and change.
This commit is contained in:
parent
2e24ee49aa
commit
54b2d8c1b8
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ public:
|
||||||
{
|
{
|
||||||
VERIFY(is_number());
|
VERIFY(is_number());
|
||||||
if (is_int32())
|
if (is_int32())
|
||||||
return static_cast<i32>(m_value.encoded);
|
return as_i32();
|
||||||
return m_value.as_double;
|
return m_value.as_double;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue