mirror of https://github.com/libAthena/athena.git
Global: Make operator|= and &= for enums constexpr
These are allowed to be constexpr since C++14
This commit is contained in:
parent
30158859f7
commit
b629d90147
|
@ -95,12 +95,12 @@ typedef struct stat64 atStat64_t;
|
|||
using T = std::underlying_type_t<type>; \
|
||||
return type(static_cast<T>(a) & static_cast<T>(b)); \
|
||||
} \
|
||||
inline type& operator|=(type& a, const type& b) { \
|
||||
constexpr type& operator|=(type& a, type b) { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
a = type(static_cast<T>(a) | static_cast<T>(b)); \
|
||||
return a; \
|
||||
} \
|
||||
inline type& operator&=(type& a, const type& b) { \
|
||||
constexpr type& operator&=(type& a, type b) { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
a = type(static_cast<T>(a) & static_cast<T>(b)); \
|
||||
return a; \
|
||||
|
|
Loading…
Reference in New Issue