From 6289583b36b28f8c21b8040ce4611e16914d0ded Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 Aug 2019 20:40:45 -0400 Subject: [PATCH] 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. --- include/boo/System.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boo/System.hpp b/include/boo/System.hpp index 8495500..509bec2 100644 --- a/include/boo/System.hpp +++ b/include/boo/System.hpp @@ -37,12 +37,12 @@ static inline ComPtr* ReferenceComPtr(ComPtr& ptr) { using T = std::underlying_type_t; \ return type(static_cast(a) & static_cast(b)); \ } \ - constexpr type& operator|=(type& a, const type& b) { \ + constexpr type& operator|=(type& a, type b) { \ using T = std::underlying_type_t; \ a = type(static_cast(a) | static_cast(b)); \ return a; \ } \ - constexpr type& operator&=(type& a, const type& b) { \ + constexpr type& operator&=(type& a, type b) { \ using T = std::underlying_type_t; \ a = type(static_cast(a) & static_cast(b)); \ return a; \