mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-08 01:58:50 +02:00
misc: chore: Use collection expressions (part 2)
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Ryujinx.Horizon
|
||||
|
||||
public HeapAllocator()
|
||||
{
|
||||
_freeRanges = new List<Range>();
|
||||
_freeRanges = [];
|
||||
_currentHeapSize = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Ryujinx.Horizon.MmNv.Ipc
|
||||
{
|
||||
partial class Request : IRequest
|
||||
{
|
||||
private readonly List<Session> _sessionList = new();
|
||||
private readonly List<Session> _sessionList = [];
|
||||
|
||||
private uint _uniqueId = 1;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ryujinx.Horizon.Sdk.Friends.Detail.Ipc
|
||||
_notificationEventHandler = notificationEventHandler;
|
||||
_userId = userId;
|
||||
_permissionLevel = permissionLevel;
|
||||
_notifications = new LinkedList<SizedNotificationInfo>();
|
||||
_notifications = [];
|
||||
Os.CreateSystemEvent(out _notificationEvent, EventClearMode.AutoClear, interProcess: true).AbortOnFailure();
|
||||
|
||||
_hasNewFriendRequest = false;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Ryujinx.Horizon.Sdk.OsTypes.Impl
|
||||
|
||||
public MultiWaitImpl()
|
||||
{
|
||||
_multiWaits = new List<MultiWaitHolderBase>();
|
||||
_multiWaits = [];
|
||||
}
|
||||
|
||||
public void LinkMultiWaitHolder(MultiWaitHolderBase multiWaitHolder)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Ryujinx.Horizon.Sdk.OsTypes
|
||||
{
|
||||
evnt = new EventType
|
||||
{
|
||||
MultiWaitHolders = new LinkedList<MultiWaitHolderBase>(),
|
||||
MultiWaitHolders = [],
|
||||
Signaled = signaled,
|
||||
InitiallySignaled = signaled,
|
||||
ClearMode = clearMode,
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
|
||||
|
||||
public EntryManager(int count)
|
||||
{
|
||||
_freeList = new LinkedList<Entry>();
|
||||
_freeList = [];
|
||||
_entries = new Entry[count];
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
@@ -87,7 +87,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
|
||||
public Domain(ServerDomainManager manager)
|
||||
{
|
||||
_manager = manager;
|
||||
_entries = new LinkedList<EntryManager.Entry>();
|
||||
_entries = [];
|
||||
}
|
||||
|
||||
public override ServiceObjectHolder GetObject(int id)
|
||||
@@ -217,7 +217,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
|
||||
public ServerDomainManager(int entryCount, int maxDomains)
|
||||
{
|
||||
_entryManager = new EntryManager(entryCount);
|
||||
_domains = new HashSet<Domain>();
|
||||
_domains = [];
|
||||
_maxDomains = maxDomains;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc
|
||||
}
|
||||
|
||||
_sessionAllocationBitmap = new ulong[(maxSessions + 63) / 64];
|
||||
_sessions = new HashSet<ServerSession>();
|
||||
_servers = new HashSet<Server>();
|
||||
_sessions = [];
|
||||
_servers = [];
|
||||
}
|
||||
|
||||
private static PointerAndSize GetObjectBySessionIndex(ServerSession session, ulong baseAddress, ulong size)
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Ryujinx.Horizon
|
||||
|
||||
public IEnumerable<ServiceEntry> GetServices(HorizonOptions options)
|
||||
{
|
||||
List<ServiceEntry> entries = new();
|
||||
List<ServiceEntry> entries = [];
|
||||
|
||||
void RegisterService<T>() where T : IService
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user