This commit is contained in:
2023-07-29 10:58:06 +03:00
parent 0a8d761cc1
commit c01b748031
16 changed files with 133 additions and 118 deletions
+3 -5
View File
@@ -37,15 +37,14 @@ public class RagonProperty : RagonPayload
public void Read(RagonBuffer buffer)
{
var readOnlySpan = _data.AsSpan();
if (IsFixed)
{
buffer.ReadSpan(ref readOnlySpan, Size);
buffer.ReadArray(_data, Size);
}
else
{
Size = (int) buffer.Read();
buffer.ReadSpan(ref readOnlySpan, Size);
buffer.ReadArray(_data, Size);
}
IsDirty = true;
@@ -53,8 +52,7 @@ public class RagonProperty : RagonPayload
public void Write(RagonBuffer buffer)
{
ReadOnlySpan<uint> readOnlySpan = _data.AsSpan();
buffer.WriteSpan(ref readOnlySpan, Size);
buffer.WriteArray(_data, Size);
}
public void Clear()