misc: chore: Use explicit types in common project

This commit is contained in:
Evan Husted
2025-01-25 14:04:12 -06:00
parent 97188556d8
commit a97fd4beb1
15 changed files with 59 additions and 56 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Buffers;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -16,15 +17,15 @@ namespace Ryujinx.Common.Extensions
/// <param name="fileFullName">The path and name of the file to create and dump to</param>
public static void DumpToFile(this ref SequenceReader<byte> reader, string fileFullName)
{
var initialConsumed = reader.Consumed;
long initialConsumed = reader.Consumed;
reader.Rewind(initialConsumed);
using (var fileStream = System.IO.File.Create(fileFullName, 4096, System.IO.FileOptions.None))
using (FileStream fileStream = System.IO.File.Create(fileFullName, 4096, System.IO.FileOptions.None))
{
while (reader.End == false)
{
var span = reader.CurrentSpan;
ReadOnlySpan<byte> span = reader.CurrentSpan;
fileStream.Write(span);
reader.Advance(span.Length);
}