From 2b06fe32defcd722b1fadea47f04992836686fa9 Mon Sep 17 00:00:00 2001 From: WiggleWizard <1405402+WiggleWizard@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:15:45 +0100 Subject: [PATCH] Small refactor of trait reflection --- Nuake/src/Core/Object/Object.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Nuake/src/Core/Object/Object.h b/Nuake/src/Core/Object/Object.h index 72f9d793..c8594ed4 100644 --- a/Nuake/src/Core/Object/Object.h +++ b/Nuake/src/Core/Object/Object.h @@ -60,25 +60,8 @@ namespace Nuake return static_cast>(e); } - inline ComponentTypeTrait operator|(ComponentTypeTrait lhs, ComponentTypeTrait rhs) - { - return static_cast(ToUnderlying(lhs) | ToUnderlying(rhs)); - } - - inline ComponentTypeTrait operator&(ComponentTypeTrait lhs, ComponentTypeTrait rhs) - { - return static_cast(ToUnderlying(lhs) & ToUnderlying(rhs)); - } - - inline ComponentFieldTrait operator|(ComponentFieldTrait lhs, ComponentFieldTrait rhs) - { - return static_cast(ToUnderlying(lhs) | ToUnderlying(rhs)); - } - - inline ComponentFieldTrait operator&(ComponentFieldTrait lhs, ComponentFieldTrait rhs) - { - return static_cast(ToUnderlying(lhs) & ToUnderlying(rhs)); - } + NK_ENUM_BITWISE_IMPL(ComponentTypeTrait); + NK_ENUM_BITWISE_IMPL(ComponentFieldTrait); } #define NUAKECOMPONENT(klass, componentName) \