mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
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.
This commit is contained in:
parent
57d143dc6e
commit
f5f9c8c597
34 changed files with 54 additions and 57 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue