Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove an early bail-out if the buffer was empty.
  • Loading branch information
teo-tsirpanis committed Oct 27, 2022
commit de0c6f24ee84f8cea20bb4edd5d29cabe3c5a642
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,6 @@ public unsafe void WriteBytes(byte* buffer, int byteCount)

private void WriteBytesUnchecked(ReadOnlySpan<byte> buffer)
{
if (buffer.IsEmpty)
{
return;
}

int bytesToCurrent = Math.Min(FreeBytes, buffer.Length);

buffer.Slice(0, bytesToCurrent).CopyTo(_buffer.AsSpan(Length));
Expand Down