misc: chore: Use collection expressions in Gpu project

This commit is contained in:
Evan Husted 2025-01-26 15:49:22 -06:00
parent ae90db2040
commit aa0cb50c5d
41 changed files with 365 additions and 304 deletions

View file

@ -61,8 +61,8 @@ namespace Ryujinx.Graphics.Gpu.Memory
_context = context;
_physicalMemory = physicalMemory;
_buffers = new RangeList<Buffer>();
_multiRangeBuffers = new MultiRangeList<MultiRangeBuffer>();
_buffers = [];
_multiRangeBuffers = [];
_bufferOverlaps = new Buffer[OverlapsBufferInitialCapacity];
@ -395,7 +395,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
ulong dstOffset = 0;
HashSet<Buffer> physicalBuffers = new();
HashSet<Buffer> physicalBuffers = [];
for (int i = 0; i < virtualBuffer.Range.Count; i++)
{
@ -1041,7 +1041,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
if (entry.Value.UnmappedSequence != entry.Value.Buffer.UnmappedSequence)
{
(toDelete ??= new()).Add(entry.Key);
(toDelete ??= []).Add(entry.Key);
}
}