mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-03 10:16:26 +02:00
misc: chore: Use explicit types in common project
This commit is contained in:
parent
97188556d8
commit
a97fd4beb1
15 changed files with 59 additions and 56 deletions
|
@ -46,7 +46,7 @@ namespace Ryujinx.Common.Utilities
|
|||
{
|
||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var trimmer = new XCIFileTrimmer(filename, log);
|
||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
||||
return trimmer.CanBeTrimmed;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace Ryujinx.Common.Utilities
|
|||
{
|
||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var trimmer = new XCIFileTrimmer(filename, log);
|
||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
||||
return trimmer.CanBeUntrimmed;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ namespace Ryujinx.Common.Utilities
|
|||
{
|
||||
long maxReads = readSizeB / XCIFileTrimmer.BufferSize;
|
||||
long read = 0;
|
||||
var buffer = new byte[BufferSize];
|
||||
byte[] buffer = new byte[BufferSize];
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -267,7 +267,7 @@ namespace Ryujinx.Common.Utilities
|
|||
|
||||
try
|
||||
{
|
||||
var info = new FileInfo(Filename);
|
||||
FileInfo info = new FileInfo(Filename);
|
||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||
{
|
||||
try
|
||||
|
@ -288,7 +288,7 @@ namespace Ryujinx.Common.Utilities
|
|||
return OperationOutcome.FileSizeChanged;
|
||||
}
|
||||
|
||||
var outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
|
||||
FileStream outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -327,7 +327,7 @@ namespace Ryujinx.Common.Utilities
|
|||
{
|
||||
Log?.Write(LogType.Info, "Untrimming...");
|
||||
|
||||
var info = new FileInfo(Filename);
|
||||
FileInfo info = new FileInfo(Filename);
|
||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||
{
|
||||
try
|
||||
|
@ -348,7 +348,7 @@ namespace Ryujinx.Common.Utilities
|
|||
return OperationOutcome.FileSizeChanged;
|
||||
}
|
||||
|
||||
var outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
|
||||
FileStream outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
|
||||
long bytesToWriteB = UntrimmedFileSizeB - FileSizeB;
|
||||
|
||||
try
|
||||
|
@ -393,7 +393,7 @@ namespace Ryujinx.Common.Utilities
|
|||
|
||||
try
|
||||
{
|
||||
var buffer = new byte[BufferSize];
|
||||
byte[] buffer = new byte[BufferSize];
|
||||
Array.Fill<byte>(buffer, XCIFileTrimmer.PaddingByte);
|
||||
|
||||
while (bytesLeftToWriteB > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue