diff --git a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs index 054d775cd..9df2f54d1 100644 --- a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs +++ b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs @@ -108,7 +108,9 @@ namespace Ryujinx.Modules while ((bytesRead = await stream.ReadAsync(buffer, CancellationToken.None)) > 0) { +#pragma warning disable IDE0057 // Disable the warning for unnecessary slicing memoryStream.Write(buffer.Slice(0, bytesRead).ToArray(), 0, bytesRead); +#pragma warning restore IDE0057 totalRead += bytesRead; int progress = (int)((totalRead * 100) / (end - start + 1)); progressPercentage[index] = progress; diff --git a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs index 5c54e16d7..2deff25f9 100644 --- a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs +++ b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs @@ -42,7 +42,9 @@ namespace Ryujinx.Modules while ((readSize = await remoteFileStream.ReadAsync(buffer, CancellationToken.None)) > 0) { +#pragma warning disable IDE0057 // Disable the warning for unnecessary slicing updateFileStream.Write(buffer.Slice(0, readSize).ToArray(), 0, readSize); +#pragma warning restore IDE0057 byteWritten += readSize; int progress = GetPercentage(byteWritten, totalBytes);