1
0
Fork 0

Codechange: Allow EnumBitSet to work with 64 bit underlying type.

pull/13477/head
Peter Nelson 2025-02-06 16:37:36 +00:00
parent e937c4dcfd
commit 225f379f96
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ public:
*/ */
inline constexpr EnumBitSet &Set(Tenum value) inline constexpr EnumBitSet &Set(Tenum value)
{ {
this->data |= (1U << to_underlying(value)); this->data |= (1ULL << to_underlying(value));
return *this; return *this;
} }
@ -155,7 +155,7 @@ public:
*/ */
inline constexpr EnumBitSet &Reset(Tenum value) inline constexpr EnumBitSet &Reset(Tenum value)
{ {
this->data &= ~(1U << to_underlying(value)); this->data &= ~(1ULL << to_underlying(value));
return *this; return *this;
} }
@ -180,7 +180,7 @@ public:
*/ */
inline constexpr bool Test(Tenum value) const inline constexpr bool Test(Tenum value) const
{ {
return (this->data & (1U << to_underlying(value))) != 0; return (this->data & (1ULL << to_underlying(value))) != 0;
} }
/** /**