[*] Enforce tags around here
This commit is contained in:
parent
73f6f6ea1e
commit
bd11c0860d
@ -90,10 +90,18 @@ namespace Aurora::Memory
|
||||
{
|
||||
if constexpr (AuIsTuple_v<AuRemoveReference_t<T>>)
|
||||
{
|
||||
if (this->ReadTagged<AuUInt16> !=
|
||||
AuTupleCountOf_v<AuRemoveReference_t<T>>)
|
||||
{
|
||||
this->flagReadError = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
AuTupleForEach(out, [=](auto &tupleElement)
|
||||
{
|
||||
Read(tupleElement);
|
||||
ReadTagged(tupleElement);
|
||||
});
|
||||
|
||||
return !this->flagReadError;
|
||||
}
|
||||
else if constexpr (AuIsOptional_v<AuRemoveReference_t<T>>)
|
||||
@ -102,7 +110,7 @@ namespace Aurora::Memory
|
||||
{
|
||||
AuRemoveReference_t<decltype(out.value())> value;
|
||||
|
||||
Read(value);
|
||||
ReadTagged(value);
|
||||
|
||||
if (this->flagReadError)
|
||||
{
|
||||
@ -246,16 +254,19 @@ namespace Aurora::Memory
|
||||
{
|
||||
if constexpr (AuIsTuple_v<AuRemoveReference_t<T>>)
|
||||
{
|
||||
this->WriteTagged<AuUInt16>(AuTupleCountOf_v<AuRemoveReference_t<T>>);
|
||||
|
||||
AuTupleForEach(in, [=](auto &tupleElement)
|
||||
{
|
||||
Write(tupleElement);
|
||||
WriteTagged(tupleElement);
|
||||
});
|
||||
|
||||
return !this->flagWriteError;
|
||||
}
|
||||
else if constexpr (AuIsOptional_v<AuRemoveReference_t<T>>)
|
||||
{
|
||||
Write<bool>(AuStaticCast<bool>(in));
|
||||
Write(in.value());
|
||||
WriteTagged(in.value());
|
||||
return !this->flagWriteError;
|
||||
}
|
||||
else if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemoveReference_t<T>>::value)
|
||||
|
Loading…
Reference in New Issue
Block a user