diff options
author | Moonchild <moonchild@palemoon.org> | 2020-09-17 23:48:58 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-09-21 11:10:23 +0000 |
commit | 3272147d97757673898da87bf02ea93438cae1a1 (patch) | |
tree | 853540025dd2241a5035b293fefc66b7b592d862 /dom/events | |
parent | f2866a5420b4645d888fc50b22f7cbdd8a178042 (diff) | |
download | UXP-3272147d97757673898da87bf02ea93438cae1a1.tar UXP-3272147d97757673898da87bf02ea93438cae1a1.tar.gz UXP-3272147d97757673898da87bf02ea93438cae1a1.tar.lz UXP-3272147d97757673898da87bf02ea93438cae1a1.tar.xz UXP-3272147d97757673898da87bf02ea93438cae1a1.zip |
Issue #1224 - Remove constant expressions from /dom
This excludes DOMProxy handlers in dom bindings because that's intertwined with
codegen and js that needs to be handled together.
Diffstat (limited to 'dom/events')
-rw-r--r-- | dom/events/EventStates.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/events/EventStates.h b/dom/events/EventStates.h index 2672d2897..183070755 100644 --- a/dom/events/EventStates.h +++ b/dom/events/EventStates.h @@ -27,7 +27,7 @@ public: typedef uint64_t InternalType; typedef uint8_t ServoType; - constexpr EventStates() + EventStates() : mStates(0) { } @@ -37,12 +37,12 @@ public: // In that case, we could be sure that only macros at the end were creating // EventStates instances with mStates set to something else than 0. // Unfortunately, this constructor is needed at at least two places now. - explicit constexpr EventStates(InternalType aStates) + explicit EventStates(InternalType aStates) : mStates(aStates) { } - EventStates constexpr operator|(const EventStates& aEventStates) const + EventStates operator|(const EventStates& aEventStates) const { return EventStates(mStates | aEventStates.mStates); } @@ -56,7 +56,7 @@ public: // NOTE: calling if (eventStates1 & eventStates2) will not build. // This might work correctly if operator bool() is defined // but using HasState, HasAllStates or HasAtLeastOneOfStates is recommended. - EventStates constexpr operator&(const EventStates& aEventStates) const + EventStates operator&(const EventStates& aEventStates) const { return EventStates(mStates & aEventStates.mStates); } |