mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Use collection expressions.
This commit is contained in:
@@ -52,13 +52,12 @@ public sealed partial class TeleDisk
|
||||
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
|
||||
out List<ulong> unknownLbas)
|
||||
{
|
||||
failingLbas = new List<ulong>();
|
||||
unknownLbas = new List<ulong>();
|
||||
failingLbas = [];
|
||||
unknownLbas = [];
|
||||
|
||||
for(ulong i = sectorAddress; i < sectorAddress + length; i++)
|
||||
{
|
||||
if(_sectorsWhereCrcHasFailed.Contains(sectorAddress)) failingLbas.Add(sectorAddress);
|
||||
}
|
||||
if(_sectorsWhereCrcHasFailed.Contains(sectorAddress))
|
||||
failingLbas.Add(sectorAddress);
|
||||
|
||||
return failingLbas.Count <= 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user