summaryrefslogtreecommitdiff
path: root/src/core/enum_type.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/enum_type.hpp')
-rw-r--r--src/core/enum_type.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp
index 1560d42d6..8df7920d3 100644
--- a/src/core/enum_type.hpp
+++ b/src/core/enum_type.hpp
@@ -145,6 +145,20 @@ struct SimpleTinyEnumT {
this->m_val = (storage_type)u;
return *this;
}
+
+ /** Bit math (or) assignment operator (from enum_type) */
+ FORCEINLINE SimpleTinyEnumT &operator |= (enum_type e)
+ {
+ this->m_val = (storage_type)((enum_type)this->m_val | e);
+ return *this;
+ }
+
+ /** Bit math (and) assignment operator (from enum_type) */
+ FORCEINLINE SimpleTinyEnumT &operator &= (enum_type e)
+ {
+ this->m_val = (storage_type)((enum_type)this->m_val & e);
+ return *this;
+ }
};
#endif /* ENUM_TYPE_HPP */