mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-29 13:00:07 +02:00
misc: chore: Use collection expressions (part 2)
This commit is contained in:
@@ -139,7 +139,7 @@ namespace Ryujinx.Common.Collections
|
||||
/// <param name="list">List to add the tree pairs into</param>
|
||||
public List<KeyValuePair<TKey, TValue>> AsLevelOrderList()
|
||||
{
|
||||
List<KeyValuePair<TKey, TValue>> list = new();
|
||||
List<KeyValuePair<TKey, TValue>> list = [];
|
||||
|
||||
Queue<Node<TKey, TValue>> nodes = new();
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace Ryujinx.Common.Collections
|
||||
/// <returns>A list of all KeyValuePairs sorted by Key Order</returns>
|
||||
public List<KeyValuePair<TKey, TValue>> AsList()
|
||||
{
|
||||
List<KeyValuePair<TKey, TValue>> list = new();
|
||||
List<KeyValuePair<TKey, TValue>> list = [];
|
||||
|
||||
AddToList(Root, list);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Ryujinx.Common.Configuration
|
||||
|
||||
public ModMetadata()
|
||||
{
|
||||
Mods = new List<Mod>();
|
||||
Mods = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace Ryujinx.Common.Logging
|
||||
_enabledClasses[index] = true;
|
||||
}
|
||||
|
||||
_logTargets = new List<ILogTarget>();
|
||||
_logTargets = [];
|
||||
|
||||
_time = Stopwatch.StartNew();
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ namespace Ryujinx.Common.PreciseSleep
|
||||
}
|
||||
|
||||
private readonly Lock _lock = new();
|
||||
private readonly List<NanosleepThread> _threads = new();
|
||||
private readonly List<NanosleepThread> _active = new();
|
||||
private readonly List<NanosleepThread> _threads = [];
|
||||
private readonly List<NanosleepThread> _active = [];
|
||||
private readonly Stack<NanosleepThread> _free = new();
|
||||
private readonly AutoResetEvent _signalTarget;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Ryujinx.Common.SystemInterop
|
||||
private long _lastId;
|
||||
|
||||
private readonly Lock _lock = new();
|
||||
private readonly List<WaitingObject> _waitingObjects = new();
|
||||
private readonly List<WaitingObject> _waitingObjects = [];
|
||||
|
||||
private WindowsGranularTimer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user