mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
AK: Change EnumBits has_flag() to check all flags in mask are present
Co-authored-by: Brian Gianforcaro <b.gianfo@gmail.com>
This commit is contained in:
parent
2df4d977e2
commit
03b76e4ba0
1 changed files with 58 additions and 58 deletions
|
@ -77,5 +77,5 @@
|
|||
Prefix constexpr bool has_flag(Enum value, Enum mask) \
|
||||
{ \
|
||||
using Type = UnderlyingType<Enum>; \
|
||||
return static_cast<Type>(value & mask) != 0; \
|
||||
return static_cast<Type>(value & mask) == static_cast<Type>(mask); \
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue