[*] bug fix in bytebuffer typedread

This commit is contained in:
Reece Wilson 2022-03-09 01:52:55 +00:00
parent b3c62bc325
commit 01647d3a0d

View File

@ -14,7 +14,7 @@ namespace Aurora::Memory
{
if constexpr (AuIsClass_v<T>)
{
if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemovePointer_t<T>>::value)
if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemoveReference_t<T>>::value)
{
if (Read<AuUInt32>() != sizeof(typename T::value_type))
{
@ -32,7 +32,7 @@ namespace Aurora::Memory
return !this->flagReadError;
}
else if constexpr (AuIsSame_v<AuRemovePointer_t<T>, AuString>)
else if constexpr (AuIsSame_v<AuRemoveReference_t<T>, AuString>)
{
out.resize(Read<AuUInt32>());
Read(out.data(), out.size());
@ -62,7 +62,7 @@ namespace Aurora::Memory
{
if constexpr (AuIsClass_v<T>)
{
if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemovePointer_t<T>>::value)
if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemoveReference_t<T>>::value)
{
Write<AuUInt32>(sizeof(typename T::value_type));
Write<AuUInt32>(AuUInt32(in.size()));
@ -74,7 +74,7 @@ namespace Aurora::Memory
return !this->flagWriteError;
}
else if constexpr (AuIsSame_v<AuRemovePointer_t<T>, AuString>)
else if constexpr (AuIsSame_v<AuRemoveReference_t<T>, AuString>)
{
Write<AuUInt32>(AuUInt32(in.size()));
Write(in.data(), in.size());