[*] Change/Fixup the object ids of ByteBufs typedreadwrite

This commit is contained in:
Reece Wilson 2024-04-24 14:23:29 +01:00
parent 298ab88648
commit a526d67bc3

View File

@ -98,6 +98,15 @@ namespace Aurora::Memory
template <>
static constexpr AuUInt8 TypeID_v<float> = (AuUInt8)Data::EDataType::kTypeStructFloat;
template <>
static constexpr AuUInt8 TypeID_v<AuVec2> = ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 4;
template <>
static constexpr AuUInt8 TypeID_v<AuVec3> = ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 5;
template <>
static constexpr AuUInt8 TypeID_v<AuVec4> = ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 6;
template <typename T>
static constexpr AuUInt8 TypeToID()
{
@ -108,15 +117,15 @@ namespace Aurora::Memory
__detail::AuHasSerializeBool2<AuRemoveReference_t<T>>::type::value ||
__detail::AuHasSerialize2<AuRemoveReference_t<T>>::type::value)
{
return (AuUInt8)Data::EDataType::kTypeSpecialReserved1; //obj+1
return ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 1; //obj+1
}
else if constexpr (AuIsTuple_v<AuRemoveReference_t<T>>)
{
return (AuUInt8)Data::EDataType::kTypeSpecialReserved4;
return ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 2;
}
else if constexpr (AuIsOptional_v<AuRemoveReference_t<T>>)
{
return (AuUInt8)Data::EDataType::kTypeSpecialReserved3;
return ((AuUInt8)Data::EDataType::kTypeSpecialReserved1) + 3;
}
else if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemoveReference_t<T>>::value)
{