mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
@@ -30,14 +30,14 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.DiscImages;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
|
||||
namespace Aaru.DiscImages;
|
||||
|
||||
public sealed partial class AppleDos
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -46,7 +46,7 @@ public sealed partial class AppleDos
|
||||
Stream stream = imageFilter.GetDataForkStream();
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
byte[] tmp = new byte[imageFilter.DataForkLength];
|
||||
var tmp = new byte[imageFilter.DataForkLength];
|
||||
stream.Read(tmp, 0, tmp.Length);
|
||||
|
||||
_extension = Path.GetExtension(imageFilter.Filename)?.ToLower();
|
||||
@@ -72,11 +72,10 @@ public sealed partial class AppleDos
|
||||
? _interleave
|
||||
: _deinterleave;
|
||||
|
||||
for(int t = 0; t < 35; t++)
|
||||
for(var t = 0; t < 35; t++)
|
||||
{
|
||||
for(int s = 0; s < 16; s++)
|
||||
Array.Copy(tmp, (t * 16 * 256) + (s * 256), _deinterleaved, (t * 16 * 256) + (offsets[s] * 256),
|
||||
256);
|
||||
for(var s = 0; s < 16; s++)
|
||||
Array.Copy(tmp, t * 16 * 256 + s * 256, _deinterleaved, t * 16 * 256 + offsets[s] * 256, 256);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,8 +95,7 @@ public sealed partial class AppleDos
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber ReadSector(ulong sectorAddress, out byte[] buffer) =>
|
||||
ReadSectors(sectorAddress, 1, out buffer);
|
||||
public ErrorNumber ReadSector(ulong sectorAddress, out byte[] buffer) => ReadSectors(sectorAddress, 1, out buffer);
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber ReadSectors(ulong sectorAddress, uint length, out byte[] buffer)
|
||||
|
||||
Reference in New Issue
Block a user