Skip to content

Commit

Permalink
More styleguide
Browse files Browse the repository at this point in the history
  • Loading branch information
amurgshere committed Oct 9, 2024
1 parent 03c55d1 commit 437c10f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/Ryujinx.Common/Utilities/XCIFileTrimmer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal static class Performance
{
internal static TimeSpan Measure(Action action)
{
Stopwatch sw = new Stopwatch();
var sw = new Stopwatch();
sw.Start();

try
Expand Down Expand Up @@ -62,7 +62,7 @@ public static bool CanTrim(string filename, ILog log = null)
{
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
{
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
var trimmer = new XCIFileTrimmer(filename, log);
return trimmer.CanBeTrimmed;
}

Expand All @@ -73,7 +73,7 @@ public static bool CanUntrim(string filename, ILog log = null)
{
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
{
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
var trimmer = new XCIFileTrimmer(filename, log);
return trimmer.CanBeUntrimmed;
}

Expand Down Expand Up @@ -215,7 +215,7 @@ private bool CheckPadding(long readSizeB)
{
long maxReads = readSizeB / XCIFileTrimmer.BufferSize;
long read = 0;
byte[] buffer = new byte[BufferSize];
var buffer = new byte[BufferSize];

while (true)
{
Expand Down Expand Up @@ -269,7 +269,7 @@ public OperationOutcome Trim()

try
{
FileInfo info = new FileInfo(Filename);
var info = new FileInfo(Filename);
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
try
Expand All @@ -290,7 +290,7 @@ public OperationOutcome Trim()
return OperationOutcome.FileSizeChanged;
}

FileStream outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
var outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);

try
{
Expand Down Expand Up @@ -326,7 +326,7 @@ public OperationOutcome Untrim()
{
Log?.Write(LogType.Info, "Untrimming...");

FileInfo info = new FileInfo(Filename);
var info = new FileInfo(Filename);
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
try
Expand All @@ -347,7 +347,7 @@ public OperationOutcome Untrim()
return OperationOutcome.FileSizeChanged;
}

FileStream outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
var outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
long bytesToWriteB = UntrimmedFileSizeB - FileSizeB;

try
Expand Down Expand Up @@ -385,7 +385,7 @@ private void WritePadding(FileStream outfileStream, long bytesToWriteB)

try
{
byte[] buffer = new byte[BufferSize];
var buffer = new byte[BufferSize];
Array.Fill<byte>(buffer, XCIFileTrimmer.PaddingByte);

while (bytesLeftToWriteB > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Gtk3/UI/XCIFileTrimmerLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Ryujinx.UI
{
public class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
{
private readonly MainWindow _mainWindow;

Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx/Common/XCIFileTrimmerLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Ryujinx.Ava.Common
{
class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
{
private readonly MainWindowViewModel _viewModel;

Expand Down

0 comments on commit 437c10f

Please sign in to comment.