Bug 1854404 - Remove global constructor in dom/html/input/InputType r=smaug

A constexpr variable is initialized at compile time and does not need a
global constructor.

Differential Revision: https://phabricator.services.mozilla.com/D188841
This commit is contained in:
serge-sans-paille 2023-09-26 13:09:39 +00:00
Родитель 71529c856c
Коммит a647e0fd70
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -24,7 +24,7 @@
using namespace mozilla;
using namespace mozilla::dom;
const Decimal InputType::kStepAny = Decimal(0);
constexpr Decimal InputType::kStepAny;
/* static */ UniquePtr<InputType, InputType::DoNotDelete> InputType::Create(
HTMLInputElement* aInputElement, FormControlType aType, void* aMemory) {

Просмотреть файл

@ -48,7 +48,7 @@ class InputType {
virtual ~InputType() = default;
// Float value returned by GetStep() when the step attribute is set to 'any'.
static const Decimal kStepAny;
static constexpr Decimal kStepAny = Decimal(0_d);
/**
* Drop the reference to the input element.