REFACTOR: Removed unneeded pragmas.

This commit is contained in:
2017-12-21 16:14:29 +00:00
parent bcbda18e4d
commit 7553983bd8
20 changed files with 0 additions and 104 deletions

View File

@@ -167,20 +167,16 @@ namespace DiscImageChef.Core.Devices.Scanning
ibgLog.Write(i, 0);
}
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
currentSpeed = (double)blockSize * blocksToRead / 1048576 / (duration / 1000);
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
GC.Collect();
}
end = DateTime.UtcNow;
DicConsole.WriteLine();
mhddLog.Close();
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
ibgLog.Close(dev, results.Blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024,
blockSize * (double)(results.Blocks + 1) / 1024 /
(results.ProcessingTime / 1000), devicePath);
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
if(ataReader.CanSeekLba)
for(int i = 0; i < SEEK_TIMES; i++)
@@ -252,9 +248,7 @@ namespace DiscImageChef.Core.Devices.Scanning
ibgLog.Write(currentBlock, 0);
}
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
currentSpeed = blockSize / (double)1048576 / (duration / 1000);
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
GC.Collect();
currentBlock++;
@@ -265,11 +259,9 @@ namespace DiscImageChef.Core.Devices.Scanning
end = DateTime.UtcNow;
DicConsole.WriteLine();
mhddLog.Close();
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
ibgLog.Close(dev, results.Blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024,
blockSize * (double)(results.Blocks + 1) / 1024 /
(results.ProcessingTime / 1000), devicePath);
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
if(ataReader.CanSeek)
for(int i = 0; i < SEEK_TIMES; i++)
@@ -299,10 +291,8 @@ namespace DiscImageChef.Core.Devices.Scanning
results.ProcessingTime /= 1000;
results.TotalTime = (end - start).TotalSeconds;
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
results.AvgSpeed = blockSize * (double)(results.Blocks + 1) / 1048576 /
results.ProcessingTime;
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
results.SeekTimes = SEEK_TIMES;
return results;