Core/Flags: Add AutoFlag property to disable automatic bit shifting
This commit is contained in:
@@ -258,7 +258,10 @@ namespace Nz
|
||||
template<typename E>
|
||||
constexpr typename Flags<E>::BitField Flags<E>::GetFlagValue(E enumValue)
|
||||
{
|
||||
return 1U << static_cast<BitField>(enumValue);
|
||||
if constexpr (AutoFlag)
|
||||
return 1U << static_cast<BitField>(enumValue);
|
||||
else
|
||||
return enumValue;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user