зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
71529c856c
Коммит
a647e0fd70
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче