mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 01:12:39 +01:00
Codechange: Allow EnumBitSet to work with 64 bit underlying type.
This commit is contained in:
committed by
Peter Nelson
parent
87e228b8b5
commit
bb43d60064
@@ -144,7 +144,7 @@ public:
|
||||
*/
|
||||
inline constexpr EnumBitSet &Set(Tenum value)
|
||||
{
|
||||
this->data |= (1U << to_underlying(value));
|
||||
this->data |= (1ULL << to_underlying(value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
*/
|
||||
inline constexpr EnumBitSet &Reset(Tenum value)
|
||||
{
|
||||
this->data &= ~(1U << to_underlying(value));
|
||||
this->data &= ~(1ULL << to_underlying(value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
*/
|
||||
inline constexpr bool Test(Tenum value) const
|
||||
{
|
||||
return (this->data & (1U << to_underlying(value))) != 0;
|
||||
return (this->data & (1ULL << to_underlying(value))) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user