mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
Fix NET14 Spans defaulting to ReadOnlySpan
This commit is contained in:
parent
c9276b1771
commit
d47a41b295
4 changed files with 11 additions and 11 deletions
|
|
@ -156,7 +156,7 @@ public ref struct ImU8String
|
|||
|
||||
return this.rentedBuffer is { } buf
|
||||
? buf.AsSpan()
|
||||
: MemoryMarshal.Cast<FixedBufferContainer, byte>(new(ref Unsafe.AsRef(ref this.fixedBuffer)));
|
||||
: MemoryMarshal.Cast<FixedBufferContainer, byte>(new Span<FixedBufferContainer>(ref Unsafe.AsRef(ref this.fixedBuffer)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ public ref struct ImU8String
|
|||
private ref byte FixedBufferByteRef => ref this.FixedBufferSpan[0];
|
||||
|
||||
private Span<byte> FixedBufferSpan =>
|
||||
MemoryMarshal.Cast<FixedBufferContainer, byte>(new(ref Unsafe.AsRef(ref this.fixedBuffer)));
|
||||
MemoryMarshal.Cast<FixedBufferContainer, byte>(new Span<FixedBufferContainer>(ref Unsafe.AsRef(ref this.fixedBuffer)));
|
||||
|
||||
public static implicit operator ImU8String(ReadOnlySpan<byte> text) => new(text);
|
||||
public static implicit operator ImU8String(ReadOnlyMemory<byte> text) => new(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue