Selaa lähdekoodia

misc: chore: Fix object creation everywhere else

Evan Husted 1 vuosi sitten
vanhempi
sitoutus
c7db948fb3

+ 1 - 1
src/Ryujinx.BuildValidationTasks/LocalesValidationTask.cs

@@ -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",

+ 8 - 8
src/Ryujinx.Graphics.Texture/Utils/BC67Tables.cs

@@ -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 =

+ 1 - 1
src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs

@@ -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)
         {

+ 1 - 1
src/Ryujinx.Horizon.Common/Result.cs

@@ -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; }
 

+ 1 - 1
src/Ryujinx.Tests.Memory/MockVirtualMemoryManager.cs

@@ -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)