From 40ac94995d76000a4b57dbb93c253f93e0f090ae Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 7 Apr 2020 16:00:44 +0100 Subject: [PATCH] LibJS: Reformat BooleanConstructor.{cpp,h} --- Libraries/LibJS/Runtime/BooleanConstructor.cpp | 8 ++++++-- 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 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(interpreter.argument(0).to_boolean()); + auto* bool_object = interpreter.heap().allocate(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 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"; } }; + }