From bc53d0046310293a90a4312fa9317bb698dded5c Mon Sep 17 00:00:00 2001
From: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun, 25 Jun 2023 18:37:09 +0200
Subject: [Ryujinx.Graphics.Vic] Address dotnet-format issues (#5374)

* dotnet format style --severity info

Some changes were manually reverted.

* Restore a few unused methods and variables

* Address review comments

* Address most dotnet format whitespace warnings

* Add comments to disabled warnings

* Address IDE0251 warnings

* dotnet format whitespace after rebase

* Remove SuppressMessage attribute for removed rule
---
 src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs')

diff --git a/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs b/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
index 10fd9d8d..079b4ef1 100644
--- a/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
+++ b/src/Ryujinx.Graphics.Vic/Image/SurfaceReader.cs
@@ -21,7 +21,8 @@ namespace Ryujinx.Graphics.Vic.Image
         {
             switch (surfaceConfig.SlotPixelFormat)
             {
-                case PixelFormat.Y8___V8U8_N420: return ReadNv12(rm, ref config, ref surfaceConfig, ref offsets);
+                case PixelFormat.Y8___V8U8_N420:
+                    return ReadNv12(rm, ref config, ref surfaceConfig, ref offsets);
             }
 
             Logger.Error?.Print(LogClass.Vic, $"Unsupported pixel format \"{surfaceConfig.SlotPixelFormat}\".");
@@ -46,7 +47,7 @@ namespace Ryujinx.Graphics.Vic.Image
             int yStride = GetPitch(width, 1);
             int uvStride = GetPitch(input.UvWidth, 2);
 
-            Surface output = new Surface(rm.SurfacePool, width, height);
+            Surface output = new(rm.SurfacePool, width, height);
 
             if (Sse41.IsSupported)
             {
@@ -276,7 +277,7 @@ namespace Ryujinx.Graphics.Vic.Image
             int bytesPerPixel,
             int planes)
         {
-            InputSurface surface = new InputSurface();
+            InputSurface surface = new();
 
             surface.Initialize();
 
@@ -458,7 +459,7 @@ namespace Ryujinx.Graphics.Vic.Image
             int outSize = dstStride * height;
             int bufferIndex = rm.BufferPool.RentMinimum(outSize, out byte[] buffer);
             Span<byte> dst = buffer;
-            dst = dst.Slice(0, outSize);
+            dst = dst[..outSize];
 
             for (int y = 0; y < height; y++)
             {
@@ -485,9 +486,9 @@ namespace Ryujinx.Graphics.Vic.Image
             int outSize = dstStride * height;
             int bufferIndex = rm.BufferPool.RentMinimum(outSize, out byte[] buffer);
             Span<byte> dst = buffer;
-            dst = dst.Slice(0, outSize);
+            dst = dst[..outSize];
 
-            LayoutConverter.ConvertBlockLinearToLinear(dst.Slice(dstStart), width, height, dstStride, bytesPerPixel, gobBlocksInY, src);
+            LayoutConverter.ConvertBlockLinearToLinear(dst[dstStart..], width, height, dstStride, bytesPerPixel, gobBlocksInY, src);
 
             return new RentedBuffer(dst, bufferIndex);
         }
-- 
cgit v1.2.3-70-g09d2