General code cleanup and style refactor.

This commit is contained in:
2022-11-15 15:58:43 +00:00
parent f59ecffb59
commit 2f9b7fe0a1
1324 changed files with 36815 additions and 37688 deletions

View File

@@ -34,8 +34,6 @@
// ReSharper disable InlineOutVariableDeclaration
// ReSharper disable TooWideLocalVariableScope
namespace Aaru.Core.Devices.Dumping;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -48,6 +46,8 @@ using Aaru.Core.Logging;
using Aaru.Devices;
using Schemas;
namespace Aaru.Core.Devices.Dumping;
partial class Dump
{
/// <summary>Dumps inter-session lead-outs</summary>
@@ -89,7 +89,7 @@ partial class Dump
{
byte[] cmdBuf = null; // Data buffer
const uint sectorSize = 2352; // Full sector size
var sense = true; // Sense indicator
bool sense = true; // Sense indicator
byte[] senseBuf = null;
var outputOptical = _outputPlugin as IWritableOpticalImage;
@@ -152,14 +152,14 @@ partial class Dump
if(supportedSubchannel != MmcSubchannel.None)
{
var data = new byte[sectorSize * _maximumReadable];
var sub = new byte[subSize * _maximumReadable];
byte[] data = new byte[sectorSize * _maximumReadable];
byte[] sub = new byte[subSize * _maximumReadable];
for(var b = 0; b < _maximumReadable; b++)
for(int b = 0; b < _maximumReadable; b++)
{
Array.Copy(cmdBuf, (int)(0 + b * blockSize), data, sectorSize * b, sectorSize);
Array.Copy(cmdBuf, (int)(0 + (b * blockSize)), data, sectorSize * b, sectorSize);
Array.Copy(cmdBuf, (int)(sectorSize + b * blockSize), sub, subSize * b, subSize);
Array.Copy(cmdBuf, (int)(sectorSize + (b * blockSize)), sub, subSize * b, subSize);
}
outputOptical.WriteSectorsLong(data, i, _maximumReadable);
@@ -261,7 +261,7 @@ partial class Dump
{
byte[] cmdBuf = null; // Data buffer
const uint sectorSize = 2352; // Full sector size
var sense = true; // Sense indicator
bool sense = true; // Sense indicator
byte[] senseBuf = null;
var outputOptical = _outputPlugin as IWritableOpticalImage;
@@ -323,14 +323,14 @@ partial class Dump
if(supportedSubchannel != MmcSubchannel.None)
{
var data = new byte[sectorSize * _maximumReadable];
var sub = new byte[subSize * _maximumReadable];
byte[] data = new byte[sectorSize * _maximumReadable];
byte[] sub = new byte[subSize * _maximumReadable];
for(var b = 0; b < _maximumReadable; b++)
for(int b = 0; b < _maximumReadable; b++)
{
Array.Copy(cmdBuf, (int)(0 + b * blockSize), data, sectorSize * b, sectorSize);
Array.Copy(cmdBuf, (int)(0 + (b * blockSize)), data, sectorSize * b, sectorSize);
Array.Copy(cmdBuf, (int)(sectorSize + b * blockSize), sub, subSize * b, subSize);
Array.Copy(cmdBuf, (int)(sectorSize + (b * blockSize)), sub, subSize * b, subSize);
}
outputOptical.WriteSectorsLong(data, i, _maximumReadable);