misc: chore: Fix object creation everywhere else

This commit is contained in:
Evan Husted 2025-01-26 15:28:18 -06:00
parent 9e1a13b2ee
commit c7db948fb3
5 changed files with 12 additions and 12 deletions

View file

@ -83,7 +83,7 @@ namespace Ryujinx.BuildValidationTasks
if (isGitRunner && encounteredIssue)
throw new JsonException("1 or more locales are invalid!");
JsonSerializerOptions jsonOptions = new JsonSerializerOptions()
JsonSerializerOptions jsonOptions = new()
{
WriteIndented = true,
NewLine = "\n",

View file

@ -4,14 +4,14 @@ namespace Ryujinx.Graphics.Texture.Utils
{
public static readonly BC7ModeInfo[] BC7ModeInfos = new BC7ModeInfo[]
{
new BC7ModeInfo(3, 4, 6, 0, 0, 3, 0, 4, 0),
new BC7ModeInfo(2, 6, 2, 0, 0, 3, 0, 6, 0),
new BC7ModeInfo(3, 6, 0, 0, 0, 2, 0, 5, 0),
new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 7, 0),
new BC7ModeInfo(1, 0, 0, 2, 1, 2, 3, 5, 6),
new BC7ModeInfo(1, 0, 0, 2, 0, 2, 2, 7, 8),
new BC7ModeInfo(1, 0, 2, 0, 0, 4, 0, 7, 7),
new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 5, 5),
new(3, 4, 6, 0, 0, 3, 0, 4, 0),
new(2, 6, 2, 0, 0, 3, 0, 6, 0),
new(3, 6, 0, 0, 0, 2, 0, 5, 0),
new(2, 6, 4, 0, 0, 2, 0, 7, 0),
new(1, 0, 0, 2, 1, 2, 3, 5, 6),
new(1, 0, 0, 2, 0, 2, 2, 7, 8),
new(1, 0, 2, 0, 0, 4, 0, 7, 7),
new(2, 6, 4, 0, 0, 2, 0, 5, 5),
};
public static readonly byte[][] Weights =

View file

@ -6,7 +6,7 @@ namespace Ryujinx.HLE.Generators
{
internal class ServiceSyntaxReceiver : ISyntaxReceiver
{
public HashSet<ClassDeclarationSyntax> Types = new HashSet<ClassDeclarationSyntax>();
public HashSet<ClassDeclarationSyntax> Types = new();
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
{

View file

@ -9,7 +9,7 @@ namespace Ryujinx.Horizon.Common
private const int ModuleMax = 1 << ModuleBits;
private const int DescriptionMax = 1 << DescriptionBits;
public static Result Success { get; } = new Result(0, 0);
public static Result Success { get; } = new(0, 0);
public int ErrorCode { get; }

View file

@ -85,7 +85,7 @@ namespace Ryujinx.Tests.Memory
IEnumerable<MemoryRange> IVirtualMemoryManager.GetPhysicalRegions(ulong va, ulong size)
{
return NoMappings ? Array.Empty<MemoryRange>() : new MemoryRange[] { new MemoryRange(va, size) };
return NoMappings ? Array.Empty<MemoryRange>() : new MemoryRange[] { new(va, size) };
}
public bool IsMapped(ulong va)