From e72a5370331f4ad07a452948c71e42f7f84387f1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 16 Apr 2020 16:11:11 +0200 Subject: [PATCH] LibJS: Make Value::m_type default to Type::Empty This is not effectful since all constructors overwrite the type anyway, but it seems reasonable that the default value of m_type would match what Value() would give you. --- Libraries/LibJS/Runtime/Value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibJS/Runtime/Value.h b/Libraries/LibJS/Runtime/Value.h index e92684f8f2..691e15f487 100644 --- a/Libraries/LibJS/Runtime/Value.h +++ b/Libraries/LibJS/Runtime/Value.h @@ -152,7 +152,7 @@ public: Object* to_object(Heap&) const; private: - Type m_type { Type::Undefined }; + Type m_type { Type::Empty }; union { bool as_bool;