misc: chore: Use collection expressions

This commit is contained in:
KeatonTheBot
2025-03-06 20:46:29 -06:00
parent 4d5757417e
commit e2973a875a
236 changed files with 9843 additions and 7561 deletions
+4 -4
View File
@@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Ipc
PId = HasPId ? reader.ReadUInt64() : 0;
int toCopySize = (word >> 1) & 0xf;
int[] toCopy = toCopySize == 0 ? Array.Empty<int>() : new int[toCopySize];
int[] toCopy = toCopySize == 0 ? [] : new int[toCopySize];
for (int index = 0; index < toCopy.Length; index++)
{
@@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Ipc
ToCopy = toCopy;
int toMoveSize = (word >> 5) & 0xf;
int[] toMove = toMoveSize == 0 ? Array.Empty<int>() : new int[toMoveSize];
int[] toMove = toMoveSize == 0 ? [] : new int[toMoveSize];
for (int index = 0; index < toMove.Length; index++)
{
@@ -59,12 +59,12 @@ namespace Ryujinx.HLE.HOS.Ipc
public static IpcHandleDesc MakeCopy(params int[] handles)
{
return new IpcHandleDesc(handles, Array.Empty<int>());
return new IpcHandleDesc(handles, []);
}
public static IpcHandleDesc MakeMove(params int[] handles)
{
return new IpcHandleDesc(Array.Empty<int>(), handles);
return new IpcHandleDesc([], handles);
}
public RecyclableMemoryStream GetStream()