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,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -37,8 +39,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Decoders.PCMCIA;
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class CIS
|
||||
@@ -46,8 +46,8 @@ public static class CIS
|
||||
// TODO: Handle links? Or are they removed in lower layers of the operating system drivers?
|
||||
public static Tuple[] GetTuples(byte[] data)
|
||||
{
|
||||
List<Tuple> tuples = new List<Tuple>();
|
||||
int position = 0;
|
||||
var tuples = new List<Tuple>();
|
||||
var position = 0;
|
||||
|
||||
while(position < data.Length)
|
||||
{
|
||||
@@ -94,10 +94,10 @@ public static class CIS
|
||||
if((data?.Length - 2) % 6 != 0)
|
||||
return null;
|
||||
|
||||
var tuple = new DeviceGeometryTuple();
|
||||
List<DeviceGeometry> geometries = new List<DeviceGeometry>();
|
||||
var tuple = new DeviceGeometryTuple();
|
||||
var geometries = new List<DeviceGeometry>();
|
||||
|
||||
for(int position = 2; position < data.Length; position += 6)
|
||||
for(var position = 2; position < data.Length; position += 6)
|
||||
{
|
||||
var geometry = new DeviceGeometry
|
||||
{
|
||||
@@ -219,10 +219,10 @@ public static class CIS
|
||||
if(data.Length < 4)
|
||||
return null;
|
||||
|
||||
List<byte> buffer = new List<byte>();
|
||||
var buffer = new List<byte>();
|
||||
List<string> strings = null;
|
||||
bool firstString = false;
|
||||
bool secondString = false;
|
||||
var firstString = false;
|
||||
var secondString = false;
|
||||
|
||||
var tuple = new Level1VersionTuple
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public static class CIS
|
||||
MinorVersion = data[3]
|
||||
};
|
||||
|
||||
for(int position = 4; position < data.Length; position++)
|
||||
for(var position = 4; position < data.Length; position++)
|
||||
{
|
||||
if(data[position] == 0xFF)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user