mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-08 07:28:49 +02:00
misc: chore: Use collection expressions (part 2)
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<MemoryBlock> _blocks = new();
|
||||
private readonly List<MemoryBlock> _blocks = [];
|
||||
|
||||
public CacheMemoryAllocator(int capacity)
|
||||
{
|
||||
|
||||
@@ -23,11 +23,11 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
|
||||
private static CacheMemoryAllocator _cacheAllocator;
|
||||
|
||||
private static readonly List<CacheEntry> _cacheEntries = new();
|
||||
private static readonly List<CacheEntry> _cacheEntries = [];
|
||||
|
||||
private static readonly Lock _lock = new();
|
||||
private static bool _initialized;
|
||||
private static readonly List<ReservedRegion> _jitRegions = new();
|
||||
private static readonly List<ReservedRegion> _jitRegions = [];
|
||||
private static int _activeRegionIndex = 0;
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
_sharedCache.Pointer,
|
||||
SharedCacheSize);
|
||||
|
||||
List<(ulong, ThreadLocalCacheEntry)> toDelete = new();
|
||||
List<(ulong, ThreadLocalCacheEntry)> toDelete = [];
|
||||
|
||||
foreach ((ulong address, ThreadLocalCacheEntry entry) in _threadLocalCache)
|
||||
{
|
||||
|
||||
@@ -35,8 +35,8 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
{
|
||||
_alignedRangeAction = alignedRangeAction;
|
||||
_alignedFunctionAction = alignedFunctionAction;
|
||||
_pendingFunctions = new();
|
||||
_ranges = new();
|
||||
_pendingFunctions = [];
|
||||
_ranges = [];
|
||||
}
|
||||
|
||||
public bool Has(ulong address)
|
||||
|
||||
Reference in New Issue
Block a user