PrimeWorldEditor/Common/EnumUtil.h

20 lines
646 B
C

#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