mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:57:35 +00:00
LibJS: run clang-format on all the files
This commit is contained in:
parent
30519c22f6
commit
8bd9f7e50e
8 changed files with 25 additions and 25 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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<ClassName>(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
|
||||
|
|
|
@ -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); \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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<const StringObject*>(this)->primitive_string().string().length();
|
||||
return property_index < (i32) static_cast<const StringObject*>(this)->primitive_string().string().length();
|
||||
if (static_cast<size_t>(property_index) >= m_elements.size())
|
||||
return false;
|
||||
return !m_elements[property_index].is_empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue