Small refactor of trait reflection

This commit is contained in:
WiggleWizard
2024-09-14 22:15:45 +01:00
parent 1d5f578e86
commit 2b06fe32de

View File

@@ -60,25 +60,8 @@ namespace Nuake
return static_cast<std::underlying_type_t<Enum>>(e);
}
inline ComponentTypeTrait operator|(ComponentTypeTrait lhs, ComponentTypeTrait rhs)
{
return static_cast<ComponentTypeTrait>(ToUnderlying(lhs) | ToUnderlying(rhs));
}
inline ComponentTypeTrait operator&(ComponentTypeTrait lhs, ComponentTypeTrait rhs)
{
return static_cast<ComponentTypeTrait>(ToUnderlying(lhs) & ToUnderlying(rhs));
}
inline ComponentFieldTrait operator|(ComponentFieldTrait lhs, ComponentFieldTrait rhs)
{
return static_cast<ComponentFieldTrait>(ToUnderlying(lhs) | ToUnderlying(rhs));
}
inline ComponentFieldTrait operator&(ComponentFieldTrait lhs, ComponentFieldTrait rhs)
{
return static_cast<ComponentFieldTrait>(ToUnderlying(lhs) & ToUnderlying(rhs));
}
NK_ENUM_BITWISE_IMPL(ComponentTypeTrait);
NK_ENUM_BITWISE_IMPL(ComponentFieldTrait);
}
#define NUAKECOMPONENT(klass, componentName) \