summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibJS/Runtime/BooleanConstructor.cpp8
-rw-r--r--Libraries/LibJS/Runtime/BooleanConstructor.h2
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"; }
};
+
}