mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 18:10:14 +01:00
replace Span with ReadOnlySpan where appropriate
This commit is contained in:
parent
52b1ce83d9
commit
9cdb5e0dbf
|
@ -2,7 +2,7 @@ namespace ServicePoint;
|
||||||
|
|
||||||
public sealed partial class BitVec
|
public sealed partial class BitVec
|
||||||
{
|
{
|
||||||
public static BitVec Load(Span<byte> bytes)
|
public static BitVec Load(ReadOnlySpan<byte> bytes)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace ServicePoint;
|
||||||
|
|
||||||
public sealed partial class Bitmap
|
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
|
unsafe
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace ServicePoint;
|
||||||
|
|
||||||
public sealed partial class BrightnessGrid
|
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
|
unsafe
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace ServicePoint;
|
||||||
|
|
||||||
public sealed partial class Cp437Grid
|
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
|
unsafe
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace ServicePoint;
|
||||||
|
|
||||||
public sealed partial class Packet
|
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
|
unsafe
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue