summaryrefslogtreecommitdiff
path: root/AK/EnumBits.h
diff options
context:
space:
mode:
Diffstat (limited to 'AK/EnumBits.h')
-rw-r--r--AK/EnumBits.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/AK/EnumBits.h b/AK/EnumBits.h
index a1216b8c26..9ee954056a 100644
--- a/AK/EnumBits.h
+++ b/AK/EnumBits.h
@@ -78,4 +78,10 @@
{ \
using Type = UnderlyingType<Enum>; \
return static_cast<Type>(value & mask) == static_cast<Type>(mask); \
+ } \
+ \
+ Prefix constexpr bool has_any_flag(Enum value, Enum mask) \
+ { \
+ using Type = UnderlyingType<Enum>; \
+ return static_cast<Type>(value & mask) != 0; \
}