mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibJS: Rename to_{i32,size_t}() to as_{i32,size_t}() for clarity
As these parameter-less overloads don't change the value's type and just assume Type::Number, naming them as_i32() and as_size_t() is more appropriate.
This commit is contained in:
parent
014cb1a55b
commit
36996bd720
6 changed files with 28 additions and 25 deletions
|
@ -69,7 +69,7 @@ BoundFunction* Function::bind(Value bound_this_value, Vector<Value> arguments)
|
|||
if (interpreter().exception())
|
||||
return nullptr;
|
||||
if (length_property.is_number())
|
||||
computed_length = max(0, length_property.to_i32() - static_cast<i32>(arguments.size()));
|
||||
computed_length = max(0, length_property.as_i32() - static_cast<i32>(arguments.size()));
|
||||
|
||||
Object* constructor_prototype = nullptr;
|
||||
auto prototype_property = target_function.get("prototype");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue