More styleguide
This commit is contained in:
parent
03c55d11c4
commit
437c10ff55
@ -11,7 +11,7 @@ namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
internal static TimeSpan Measure(Action action)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
|
||||
try
|
||||
@ -62,7 +62,7 @@ namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
||||
var trimmer = new XCIFileTrimmer(filename, log);
|
||||
return trimmer.CanBeTrimmed;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
|
||||
var trimmer = new XCIFileTrimmer(filename, log);
|
||||
return trimmer.CanBeUntrimmed;
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
long maxReads = readSizeB / XCIFileTrimmer.BufferSize;
|
||||
long read = 0;
|
||||
byte[] buffer = new byte[BufferSize];
|
||||
var buffer = new byte[BufferSize];
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -269,7 +269,7 @@ namespace Ryujinx.Common.Utilities
|
||||
|
||||
try
|
||||
{
|
||||
FileInfo info = new FileInfo(Filename);
|
||||
var info = new FileInfo(Filename);
|
||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||
{
|
||||
try
|
||||
@ -290,7 +290,7 @@ namespace Ryujinx.Common.Utilities
|
||||
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
|
||||
{
|
||||
@ -326,7 +326,7 @@ namespace Ryujinx.Common.Utilities
|
||||
{
|
||||
Log?.Write(LogType.Info, "Untrimming...");
|
||||
|
||||
FileInfo info = new FileInfo(Filename);
|
||||
var info = new FileInfo(Filename);
|
||||
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
|
||||
{
|
||||
try
|
||||
@ -347,7 +347,7 @@ namespace Ryujinx.Common.Utilities
|
||||
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
|
||||
@ -385,7 +385,7 @@ namespace Ryujinx.Common.Utilities
|
||||
|
||||
try
|
||||
{
|
||||
byte[] buffer = new byte[BufferSize];
|
||||
var buffer = new byte[BufferSize];
|
||||
Array.Fill<byte>(buffer, XCIFileTrimmer.PaddingByte);
|
||||
|
||||
while (bytesLeftToWriteB > 0)
|
||||
|
@ -3,7 +3,7 @@ using System;
|
||||
|
||||
namespace Ryujinx.UI
|
||||
{
|
||||
public class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||
{
|
||||
private readonly MainWindow _mainWindow;
|
||||
|
||||
|
@ -2,7 +2,7 @@ using Ryujinx.Ava.UI.ViewModels;
|
||||
|
||||
namespace Ryujinx.Ava.Common
|
||||
{
|
||||
class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||
internal class XCIFileTrimmerLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||
{
|
||||
private readonly MainWindowViewModel _viewModel;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user