mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Loop can be converted into LINQ-expression.
This commit is contained in:
@@ -725,13 +725,11 @@ namespace DiscImageChef.DiscImages
|
||||
bool extentFound = false;
|
||||
ulong extentStartSector = 0;
|
||||
|
||||
foreach(KeyValuePair<ulong, VMwareExtent> kvp in extents)
|
||||
if(sectorAddress >= kvp.Key)
|
||||
{
|
||||
currentExtent = kvp.Value;
|
||||
extentFound = true;
|
||||
extentStartSector = kvp.Key;
|
||||
}
|
||||
foreach(KeyValuePair<ulong, VMwareExtent> kvp in extents.Where(kvp => sectorAddress >= kvp.Key)) {
|
||||
currentExtent = kvp.Value;
|
||||
extentFound = true;
|
||||
extentStartSector = kvp.Key;
|
||||
}
|
||||
|
||||
if(!extentFound)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress),
|
||||
|
||||
Reference in New Issue
Block a user