REFACTOR: Loop can be converted into LINQ-expression.

This commit is contained in:
2017-12-21 07:08:26 +00:00
parent 4d886dae25
commit 5592f147ac
71 changed files with 668 additions and 1131 deletions

View File

@@ -245,10 +245,7 @@ namespace DiscImageChef.Filesystems
ulong[] positions = {256, 512, partition.End - 256, partition.End};
bool anchorFound = false;
foreach(ulong position in positions)
{
if(position + partition.Start >= partition.End) continue;
foreach(ulong position in positions.Where(position => position + partition.Start < partition.End)) {
sector = imagePlugin.ReadSector(position);
anchor = new AnchorVolumeDescriptorPointer();
IntPtr anchorPtr = Marshal.AllocHGlobal(Marshal.SizeOf(anchor));