replace Span with ReadOnlySpan where appropriate

This commit is contained in:
Vinzenz Schroeter 2024-10-20 13:31:41 +02:00
parent 52b1ce83d9
commit 9cdb5e0dbf
5 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@ namespace ServicePoint;
public sealed partial class BitVec
{
public static BitVec Load(Span<byte> bytes)
public static BitVec Load(ReadOnlySpan<byte> bytes)
{
unsafe
{

View file

@ -2,7 +2,7 @@ namespace ServicePoint;
public sealed partial class Bitmap
{
public static Bitmap Load(nuint width, nuint height, Span<byte> bytes)
public static Bitmap Load(nuint width, nuint height, ReadOnlySpan<byte> bytes)
{
unsafe
{

View file

@ -2,7 +2,7 @@ namespace ServicePoint;
public sealed partial class BrightnessGrid
{
public static BrightnessGrid Load(nuint width, nuint height, Span<byte> bytes)
public static BrightnessGrid Load(nuint width, nuint height, ReadOnlySpan<byte> bytes)
{
unsafe
{

View file

@ -4,7 +4,7 @@ namespace ServicePoint;
public sealed partial class Cp437Grid
{
public static Cp437Grid Load(nuint width, nuint height, Span<byte> bytes)
public static Cp437Grid Load(nuint width, nuint height, ReadOnlySpan<byte> bytes)
{
unsafe
{

View file

@ -4,7 +4,7 @@ namespace ServicePoint;
public sealed partial class Packet
{
public static bool TryLoad(Span<byte> bytes, [MaybeNullWhen(false)] out Packet packet)
public static bool TryLoad(ReadOnlySpan<byte> bytes, [MaybeNullWhen(false)] out Packet packet)
{
unsafe
{