
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
28 lines
499 B
C++
28 lines
499 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
namespace JS {
|
|
|
|
class NumberObject : public Object {
|
|
JS_OBJECT(NumberObject, Object);
|
|
|
|
public:
|
|
static NumberObject* create(GlobalObject&, double);
|
|
|
|
NumberObject(double, Object& prototype);
|
|
virtual ~NumberObject() override = default;
|
|
|
|
double number() const { return m_value; }
|
|
|
|
private:
|
|
double m_value { 0 };
|
|
};
|
|
|
|
}
|