mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibJS: Reformat BooleanConstructor.{cpp,h}
This commit is contained in:
parent
a31ef54a2a
commit
40ac94995d
2 changed files with 8 additions and 2 deletions
|
@ -31,13 +31,16 @@
|
|||
#include <LibJS/Runtime/BooleanPrototype.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
BooleanConstructor::BooleanConstructor()
|
||||
{
|
||||
put("prototype", Value(interpreter().boolean_prototype()));
|
||||
put("length", Value(1));
|
||||
}
|
||||
|
||||
BooleanConstructor::~BooleanConstructor() {}
|
||||
BooleanConstructor::~BooleanConstructor()
|
||||
{
|
||||
}
|
||||
|
||||
Value BooleanConstructor::call(Interpreter& interpreter)
|
||||
{
|
||||
|
@ -46,7 +49,8 @@ Value BooleanConstructor::call(Interpreter& interpreter)
|
|||
|
||||
Value BooleanConstructor::construct(Interpreter& interpreter)
|
||||
{
|
||||
auto bool_object = interpreter.heap().allocate<BooleanObject>(interpreter.argument(0).to_boolean());
|
||||
auto* bool_object = interpreter.heap().allocate<BooleanObject>(interpreter.argument(0).to_boolean());
|
||||
return Value(bool_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue