mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03: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
Notes:
sideshowbarker
2024-07-18 08:56:55 +09:00
Author: https://github.com/timmot Commit: https://github.com/SerenityOS/serenity/commit/03b76e4ba05 Pull-request: https://github.com/SerenityOS/serenity/pull/8724 Reviewed-by: https://github.com/bgianfo ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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…
Reference in New Issue
Block a user