mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-30 17:57:58 +02:00
misc: chore: Use collection expressions (part 2)
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
|
||||
private BsdContext()
|
||||
{
|
||||
_fds = new List<IFileDescriptor>();
|
||||
_fds = [];
|
||||
}
|
||||
|
||||
public ISocket RetrieveSocket(int socketFd)
|
||||
@@ -47,7 +47,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
|
||||
public List<IFileDescriptor> RetrieveFileDescriptorsFromMask(ReadOnlySpan<byte> mask)
|
||||
{
|
||||
List<IFileDescriptor> fds = new();
|
||||
List<IFileDescriptor> fds = [];
|
||||
|
||||
for (int i = 0; i < mask.Length; i++)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||
{
|
||||
updatedCount = 0;
|
||||
|
||||
List<ManualResetEvent> waiters = new();
|
||||
List<ManualResetEvent> waiters = [];
|
||||
|
||||
for (int i = 0; i < events.Count; i++)
|
||||
{
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||
|
||||
public LinuxError Poll(List<PollEvent> events, int timeoutMilliseconds, out int updatedCount)
|
||||
{
|
||||
List<ISocketImpl> readEvents = new();
|
||||
List<ISocketImpl> writeEvents = new();
|
||||
List<ISocketImpl> errorEvents = new();
|
||||
List<ISocketImpl> readEvents = [];
|
||||
List<ISocketImpl> writeEvents = [];
|
||||
List<ISocketImpl> errorEvents = [];
|
||||
|
||||
updatedCount = 0;
|
||||
|
||||
@@ -123,9 +123,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||
|
||||
public LinuxError Select(List<PollEvent> events, int timeout, out int updatedCount)
|
||||
{
|
||||
List<ISocketImpl> readEvents = new();
|
||||
List<ISocketImpl> writeEvents = new();
|
||||
List<ISocketImpl> errorEvents = new();
|
||||
List<ISocketImpl> readEvents = [];
|
||||
List<ISocketImpl> writeEvents = [];
|
||||
List<ISocketImpl> errorEvents = [];
|
||||
|
||||
updatedCount = 0;
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres
|
||||
|
||||
private static List<AddrInfoSerialized> DeserializeAddrInfos(IVirtualMemoryManager memory, ulong address, ulong size)
|
||||
{
|
||||
List<AddrInfoSerialized> result = new();
|
||||
List<AddrInfoSerialized> result = [];
|
||||
|
||||
ReadOnlySpan<byte> data = memory.GetSpan(address, (int)size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user