mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-08 08:02:34 -07:00
Migrate Collection Expressions
This commit is contained in:
@@ -151,7 +151,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
private void InitializeCarriers()
|
||||
{
|
||||
_infosStream = MemoryStreamManager.Shared.GetStream();
|
||||
_codesList = new List<byte[]>();
|
||||
_codesList = [];
|
||||
_relocsStream = MemoryStreamManager.Shared.GetStream();
|
||||
_unwindInfosStream = MemoryStreamManager.Shared.GetStream();
|
||||
}
|
||||
@@ -318,7 +318,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
return false;
|
||||
}
|
||||
|
||||
ReadOnlySpan<byte> codesBytes = (int)innerHeader.CodesLength > 0 ? new(stream.PositionPointer, (int)innerHeader.CodesLength) : ReadOnlySpan<byte>.Empty;
|
||||
ReadOnlySpan<byte> codesBytes = (int)innerHeader.CodesLength > 0 ? new(stream.PositionPointer, (int)innerHeader.CodesLength) : [];
|
||||
stream.Seek(innerHeader.CodesLength, SeekOrigin.Current);
|
||||
|
||||
Hash128 codesHash = XXHash128.ComputeHash(codesBytes);
|
||||
@@ -467,7 +467,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
ReadOnlySpan<byte> infosBytes = new(stream.PositionPointer, innerHeader.InfosLength);
|
||||
_infosStream.WriteTo(stream);
|
||||
|
||||
ReadOnlySpan<byte> codesBytes = (int)innerHeader.CodesLength > 0 ? new(stream.PositionPointer, (int)innerHeader.CodesLength) : ReadOnlySpan<byte>.Empty;
|
||||
ReadOnlySpan<byte> codesBytes = (int)innerHeader.CodesLength > 0 ? new(stream.PositionPointer, (int)innerHeader.CodesLength) : [];
|
||||
_codesList.WriteTo(stream);
|
||||
|
||||
ReadOnlySpan<byte> relocsBytes = new(stream.PositionPointer, innerHeader.RelocsLength);
|
||||
@@ -758,7 +758,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
|
||||
private void StubCode(int index)
|
||||
{
|
||||
_codesList[index] = Array.Empty<byte>();
|
||||
_codesList[index] = [];
|
||||
}
|
||||
|
||||
private void StubReloc(int relocEntriesCount)
|
||||
@@ -843,7 +843,7 @@ namespace ARMeilleure.Translation.PTC
|
||||
}
|
||||
}
|
||||
|
||||
List<Thread> threads = new();
|
||||
List<Thread> threads = [];
|
||||
|
||||
for (int i = 0; i < degreeOfParallelism; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user