diff options
author | Linus Groh <mail@linusgroh.de> | 2020-04-07 16:00:44 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-07 17:25:50 +0200 |
commit | 40ac94995d76000a4b57dbb93c253f93e0f090ae (patch) | |
tree | 381c027a686928c16c90921c3e0b7356af41eeec | |
parent | a31ef54a2a97864187bba71618aed5abeaeef70a (diff) | |
download | serenity-40ac94995d76000a4b57dbb93c253f93e0f090ae.zip |
LibJS: Reformat BooleanConstructor.{cpp,h}
-rw-r--r-- | Libraries/LibJS/Runtime/BooleanConstructor.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibJS/Runtime/BooleanConstructor.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/BooleanConstructor.cpp b/Libraries/LibJS/Runtime/BooleanConstructor.cpp index 6d756d5865..c8254abd66 100644 --- a/Libraries/LibJS/Runtime/BooleanConstructor.cpp +++ b/Libraries/LibJS/Runtime/BooleanConstructor.cpp @@ -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); } + } diff --git a/Libraries/LibJS/Runtime/BooleanConstructor.h b/Libraries/LibJS/Runtime/BooleanConstructor.h index 05fa5a5b63..ea98181b7c 100644 --- a/Libraries/LibJS/Runtime/BooleanConstructor.h +++ b/Libraries/LibJS/Runtime/BooleanConstructor.h @@ -29,6 +29,7 @@ #include <LibJS/Runtime/NativeFunction.h> namespace JS { + class BooleanConstructor final : public NativeFunction { public: BooleanConstructor(); @@ -41,4 +42,5 @@ private: virtual bool has_constructor() const override { return true; } virtual const char* class_name() const override { return "BooleanConstructor"; } }; + } |