mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +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
|
@ -1189,8 +1189,8 @@ PropertyName MemberExpression::computed_property_name(Interpreter& interpreter)
|
|||
|
||||
ASSERT(!index.is_empty());
|
||||
|
||||
if (index.is_integer() && index.to_i32() >= 0)
|
||||
return PropertyName(index.to_i32());
|
||||
if (index.is_integer() && index.as_i32() >= 0)
|
||||
return PropertyName(index.as_i32());
|
||||
|
||||
auto index_string = index.to_string(interpreter);
|
||||
if (interpreter.exception())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue