mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-30 17:49:57 -06:00
Rename ToSpan to AsSpan (#3556)
This commit is contained in:
@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
|
||||
public IPEndPoint ToIPEndPoint()
|
||||
{
|
||||
IPAddress address = new IPAddress(Address.ToSpan());
|
||||
IPAddress address = new IPAddress(Address.AsSpan());
|
||||
int port = (ushort)IPAddress.NetworkToHostOrder((short)Port);
|
||||
|
||||
return new IPEndPoint(address, port);
|
||||
@ -31,7 +31,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
Port = (ushort)IPAddress.HostToNetworkOrder((short)endpoint.Port)
|
||||
};
|
||||
|
||||
endpoint.Address.GetAddressBytes().AsSpan().CopyTo(result.Address.ToSpan());
|
||||
endpoint.Address.GetAddressBytes().AsSpan().CopyTo(result.Address.AsSpan());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Types
|
||||
Port = port;
|
||||
Address = new Array4<byte>();
|
||||
|
||||
address.TryWriteBytes(Address.ToSpan(), out _);
|
||||
address.TryWriteBytes(Address.AsSpan(), out _);
|
||||
}
|
||||
|
||||
public void ToNetworkOrder()
|
||||
@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Types
|
||||
{
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
address.ToSpan().Reverse();
|
||||
address.AsSpan().Reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user