1
Fork 0
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:
Linus Groh 2020-04-07 16:00:44 +01:00 committed by Andreas Kling
parent a31ef54a2a
commit 40ac94995d
2 changed files with 8 additions and 2 deletions

View file

@ -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);
}
}