mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 18:59:12 +00:00
Initial commit of current work on Prime World Editor
This commit is contained in:
19
Common/EnumUtil.h
Normal file
19
Common/EnumUtil.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef ENUMUTIL
|
||||
#define ENUMUTIL
|
||||
|
||||
#define DEFINE_ENUM_FLAGS(X) \
|
||||
inline X operator|(const X& A, const X& B) { \
|
||||
return (X) ((int) A | (int) B); \
|
||||
} \
|
||||
inline void operator|= (X& A, X& B) { \
|
||||
A = A | B; \
|
||||
} \
|
||||
inline X operator|(const X& A, const int B) { \
|
||||
return (X) ((int) A | B); \
|
||||
} \
|
||||
inline void operator|= (X& A, int B) { \
|
||||
A = A | B; \
|
||||
}
|
||||
|
||||
#endif // ENUMUTIL
|
||||
|
||||
Reference in New Issue
Block a user