Skip to content

Commit

Permalink
feat: making PadToByte public
Browse files Browse the repository at this point in the history
this is sometimes needed when using CopyFromWriter to correctly align data
  • Loading branch information
James-Frowen committed Jun 10, 2024
1 parent c2785d1 commit 43363ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/Serialization/NetworkReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private void ThrowPositionOverLength(int newPosition)
throw new EndOfStreamException($"Can not read over end of buffer, new position {newPosition}, length {_bitLength} bits");
}

private void PadToByte()
public void PadToByte()
{
_bitPosition = BytePosition << 3;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/Serialization/NetworkWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void ThrowLengthOverCapacity(int newLength)
throw new InvalidOperationException($"Can not write over end of buffer, new length {newLength}, capacity {_bitCapacity}");
}

private void PadToByte()
public void PadToByte()
{
_bitPosition = ByteLength << 3;
}
Expand Down

0 comments on commit 43363ba

Please sign in to comment.