diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h index 64262a5740..a07e79550f 100644 --- a/Libraries/LibJS/AST.h +++ b/Libraries/LibJS/AST.h @@ -50,7 +50,7 @@ create_ast_node(Args&&... args) class ASTNode : public RefCounted { public: - virtual ~ASTNode() {} + virtual ~ASTNode() { } virtual const char* class_name() const = 0; virtual Value execute(Interpreter&) const = 0; virtual void dump(int indent) const; @@ -63,7 +63,7 @@ public: virtual bool is_new_expression() const { return false; } protected: - ASTNode() {} + ASTNode() { } private: }; @@ -120,7 +120,7 @@ public: const NonnullRefPtrVector& variables() const { return m_variables; } protected: - ScopeNode() {} + ScopeNode() { } private: virtual bool is_scope_node() const final { return true; } @@ -130,7 +130,7 @@ private: class Program : public ScopeNode { public: - Program() {} + Program() { } private: virtual bool is_program() const override { return true; } @@ -139,7 +139,7 @@ private: class BlockStatement : public ScopeNode { public: - BlockStatement() {} + BlockStatement() { } private: virtual const char* class_name() const override { return "BlockStatement"; } @@ -454,7 +454,7 @@ private: class Literal : public Expression { protected: - explicit Literal() {} + explicit Literal() { } }; class BooleanLiteral final : public Literal { @@ -507,7 +507,7 @@ private: class NullLiteral final : public Literal { public: - explicit NullLiteral() {} + explicit NullLiteral() { } virtual Value execute(Interpreter&) const override; virtual void dump(int indent) const override; @@ -935,7 +935,7 @@ private: class BreakStatement final : public Statement { public: - BreakStatement() {} + BreakStatement() { } virtual Value execute(Interpreter&) const override; @@ -945,7 +945,7 @@ private: class ContinueStatement final : public Statement { public: - ContinueStatement() {} + ContinueStatement() { } virtual Value execute(Interpreter&) const override; @@ -955,7 +955,7 @@ private: class DebuggerStatement final : public Statement { public: - DebuggerStatement() {} + DebuggerStatement() { } virtual Value execute(Interpreter&) const override; diff --git a/Libraries/LibJS/Heap/Heap.cpp b/Libraries/LibJS/Heap/Heap.cpp index c36a43e7cf..53d6c6377b 100644 --- a/Libraries/LibJS/Heap/Heap.cpp +++ b/Libraries/LibJS/Heap/Heap.cpp @@ -198,7 +198,7 @@ Cell* Heap::cell_from_possible_pointer(FlatPtr pointer) class MarkingVisitor final : public Cell::Visitor { public: - MarkingVisitor() {} + MarkingVisitor() { } virtual void visit_impl(Cell* cell) { diff --git a/Libraries/LibJS/Runtime/BooleanPrototype.cpp b/Libraries/LibJS/Runtime/BooleanPrototype.cpp index 19cfba7440..bb0730ee72 100644 --- a/Libraries/LibJS/Runtime/BooleanPrototype.cpp +++ b/Libraries/LibJS/Runtime/BooleanPrototype.cpp @@ -39,7 +39,7 @@ BooleanPrototype::BooleanPrototype() put_native_function("valueOf", value_of, 0, Attribute::Writable | Attribute::Configurable); } -BooleanPrototype::~BooleanPrototype() {} +BooleanPrototype::~BooleanPrototype() { } Value BooleanPrototype::to_string(Interpreter& interpreter) { diff --git a/Libraries/LibJS/Runtime/Error.cpp b/Libraries/LibJS/Runtime/Error.cpp index c41e87854f..1d2b32fd3c 100644 --- a/Libraries/LibJS/Runtime/Error.cpp +++ b/Libraries/LibJS/Runtime/Error.cpp @@ -48,16 +48,16 @@ Error::~Error() { } -#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \ - ClassName* ClassName::create(GlobalObject& global_object, const String& message) \ - { \ +#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \ + ClassName* ClassName::create(GlobalObject& global_object, const String& message) \ + { \ return global_object.heap().allocate(message, *global_object.snake_name##_prototype()); \ - } \ - ClassName::ClassName(const String& message, Object& prototype) \ - : Error(#ClassName, message, prototype) \ - { \ - } \ - ClassName::~ClassName() {} \ + } \ + ClassName::ClassName(const String& message, Object& prototype) \ + : Error(#ClassName, message, prototype) \ + { \ + } \ + ClassName::~ClassName() { } \ const char* ClassName::class_name() const { return #ClassName; } JS_ENUMERATE_ERROR_SUBCLASSES diff --git a/Libraries/LibJS/Runtime/ErrorConstructor.cpp b/Libraries/LibJS/Runtime/ErrorConstructor.cpp index 8a5a3e9d44..3904a90747 100644 --- a/Libraries/LibJS/Runtime/ErrorConstructor.cpp +++ b/Libraries/LibJS/Runtime/ErrorConstructor.cpp @@ -62,7 +62,7 @@ Value ErrorConstructor::construct(Interpreter& interpreter) put("prototype", interpreter().global_object().snake_name##_prototype(), 0); \ put("length", Value(1), Attribute::Configurable); \ } \ - ConstructorName::~ConstructorName() {} \ + ConstructorName::~ConstructorName() { } \ Value ConstructorName::call(Interpreter& interpreter) \ { \ return construct(interpreter); \ diff --git a/Libraries/LibJS/Runtime/ErrorPrototype.cpp b/Libraries/LibJS/Runtime/ErrorPrototype.cpp index 10246270f9..6692a9cd86 100644 --- a/Libraries/LibJS/Runtime/ErrorPrototype.cpp +++ b/Libraries/LibJS/Runtime/ErrorPrototype.cpp @@ -109,7 +109,7 @@ Value ErrorPrototype::to_string(Interpreter& interpreter) : Object(interpreter().global_object().error_prototype()) \ { \ } \ - PrototypeName::~PrototypeName() {} \ + PrototypeName::~PrototypeName() { } \ const char* PrototypeName::class_name() const { return #PrototypeName; } JS_ENUMERATE_ERROR_SUBCLASSES diff --git a/Libraries/LibJS/Runtime/MarkedValueList.cpp b/Libraries/LibJS/Runtime/MarkedValueList.cpp index 5980ed84bc..58af575885 100644 --- a/Libraries/LibJS/Runtime/MarkedValueList.cpp +++ b/Libraries/LibJS/Runtime/MarkedValueList.cpp @@ -35,7 +35,7 @@ MarkedValueList::MarkedValueList(Heap& heap) m_heap.did_create_marked_value_list({}, *this); } -MarkedValueList:: MarkedValueList(MarkedValueList&& other) +MarkedValueList::MarkedValueList(MarkedValueList&& other) : m_heap(other.m_heap) , m_values(move(other.m_values)) { diff --git a/Libraries/LibJS/Runtime/Object.cpp b/Libraries/LibJS/Runtime/Object.cpp index 3e2e677ff6..a9ad694d90 100644 --- a/Libraries/LibJS/Runtime/Object.cpp +++ b/Libraries/LibJS/Runtime/Object.cpp @@ -435,7 +435,7 @@ bool Object::has_own_property(const FlyString& property_name) const i32 property_index = property_name.to_int(ok); if (ok && property_index >= 0) { if (is_string_object()) - return property_index < (i32)static_cast(this)->primitive_string().string().length(); + return property_index < (i32) static_cast(this)->primitive_string().string().length(); if (static_cast(property_index) >= m_elements.size()) return false; return !m_elements[property_index].is_empty();