mirror of https://github.com/AxioDL/boo.git
System: Take input parameter for operator|= and &= by value
These are just trivial enum values, so they can be passed by value to avoid unnecessary dereferencing.
This commit is contained in:
parent
ff0b3eb2b1
commit
6289583b36
|
@ -37,12 +37,12 @@ static inline ComPtr<T>* ReferenceComPtr(ComPtr<T>& ptr) {
|
|||
using T = std::underlying_type_t<type>; \
|
||||
return type(static_cast<T>(a) & static_cast<T>(b)); \
|
||||
} \
|
||||
constexpr 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; \
|
||||
} \
|
||||
constexpr 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