misc: chore: Use collection expressions in HLE project

This commit is contained in:
Evan Husted 2025-01-26 15:43:02 -06:00
parent 3c2f283ec7
commit 70b767ef60
72 changed files with 312 additions and 299 deletions

View file

@ -16,8 +16,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
{
_parent = parent;
_incomingConnections = new LinkedList<KServerSession>();
_lightIncomingConnections = new LinkedList<KLightServerSession>();
_incomingConnections = [];
_lightIncomingConnections = [];
}
public void EnqueueIncomingSession(KServerSession session)

View file

@ -10,12 +10,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
{
class KServerSession : KSynchronizationObject
{
private static readonly MemoryState[] _ipcMemoryStates = {
private static readonly MemoryState[] _ipcMemoryStates =
[
MemoryState.IpcBuffer3,
MemoryState.IpcBuffer0,
MemoryState.IpcBuffer1,
(MemoryState)0xfffce5d4, //This is invalid, shouldn't be accessed.
};
(MemoryState)0xfffce5d4 //This is invalid, shouldn't be accessed.
];
private readonly struct Message
{
@ -176,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
{
_parent = parent;
_requests = new LinkedList<KSessionRequest>();
_requests = [];
}
public Result EnqueueRequest(KSessionRequest request)