mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
LibJS: Reformat ArrayPrototype.cpp
This commit is contained in:
parent
39b5494aeb
commit
99e775cee3
1 changed files with 5 additions and 6 deletions
|
@ -706,10 +706,10 @@ Value ArrayPrototype::splice(Interpreter& interpreter)
|
||||||
this_object->put(to, from);
|
this_object->put(to, from);
|
||||||
if (interpreter.exception())
|
if (interpreter.exception())
|
||||||
return {};
|
return {};
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
this_object->delete_property(to);
|
this_object->delete_property(to);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = initial_length; i > new_length; --i)
|
for (size_t i = initial_length; i > new_length; --i)
|
||||||
this_object->delete_property(i - 1);
|
this_object->delete_property(i - 1);
|
||||||
|
@ -725,11 +725,11 @@ Value ArrayPrototype::splice(Interpreter& interpreter)
|
||||||
this_object->put(to, from);
|
this_object->put(to, from);
|
||||||
if (interpreter.exception())
|
if (interpreter.exception())
|
||||||
return {};
|
return {};
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
this_object->delete_property(to);
|
this_object->delete_property(to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < insert_count; ++i) {
|
for (size_t i = 0; i < insert_count; ++i) {
|
||||||
this_object->put(actual_start + i, interpreter.argument(i + 2));
|
this_object->put(actual_start + i, interpreter.argument(i + 2));
|
||||||
|
@ -746,7 +746,7 @@ Value ArrayPrototype::splice(Interpreter& interpreter)
|
||||||
|
|
||||||
Value ArrayPrototype::fill(Interpreter& interpreter)
|
Value ArrayPrototype::fill(Interpreter& interpreter)
|
||||||
{
|
{
|
||||||
auto *this_object = interpreter.this_value().to_object(interpreter);
|
auto* this_object = interpreter.this_value().to_object(interpreter);
|
||||||
if (!this_object)
|
if (!this_object)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
|
@ -791,4 +791,3 @@ Value ArrayPrototype::fill(Interpreter& interpreter)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue