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:
Lioncash 2019-08-17 20:40:45 -04:00
parent ff0b3eb2b1
commit 6289583b36
1 changed files with 2 additions and 2 deletions

View File

@ -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; \