Minor cleanup and added some Type utils
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include <NBCore/TypeTraits.hpp>
|
||||
|
||||
namespace nb {
|
||||
|
||||
template<> constexpr TypeCodes GetTypeEnum<unsigned char> = TypeCodes::UINT8;
|
||||
template<> constexpr TypeCodes GetTypeEnum<unsigned short> = TypeCodes::UINT16;
|
||||
template<> constexpr TypeCodes GetTypeEnum<unsigned int> = TypeCodes::UINT32;
|
||||
template<> constexpr TypeCodes GetTypeEnum<unsigned long int> = TypeCodes::UINT64;
|
||||
template<> constexpr TypeCodes GetTypeEnum<char> = TypeCodes::INT8;
|
||||
template<> constexpr TypeCodes GetTypeEnum<short> = TypeCodes::INT16;
|
||||
template<> constexpr TypeCodes GetTypeEnum<int> = TypeCodes::INT32;
|
||||
template<> constexpr TypeCodes GetTypeEnum<long> = TypeCodes::INT64;
|
||||
template<> constexpr TypeCodes GetTypeEnum<float> = TypeCodes::FLOAT32;
|
||||
template<> constexpr TypeCodes GetTypeEnum<double> = TypeCodes::DOUBLE64;
|
||||
template<> constexpr TypeCodes GetTypeEnum<bool> = TypeCodes::BOOL;
|
||||
|
||||
} // namespace nb
|
||||
Reference in New Issue
Block a user