mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Remove redundant parentheses.
This commit is contained in:
@@ -288,7 +288,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
|
||||
double cmdDuration = 0;
|
||||
|
||||
if((results.Blocks - i) < blocksToRead) blocksToRead = (uint)(results.Blocks - i);
|
||||
if(results.Blocks - i < blocksToRead) blocksToRead = (uint)(results.Blocks - i);
|
||||
|
||||
#pragma warning disable RECS0018 // Comparison of floating point numbers with equality operator
|
||||
if(currentSpeed > results.MaxSpeed && currentSpeed != 0) results.MaxSpeed = currentSpeed;
|
||||
@@ -354,7 +354,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
|
||||
currentSpeed = ((double)blockSize * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
||||
currentSpeed = (double)blockSize * blocksToRead / (double)1048576 / (cmdDuration / (double)1000);
|
||||
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
|
||||
GC.Collect();
|
||||
}
|
||||
@@ -364,7 +364,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
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,
|
||||
(((double)blockSize * (double)(results.Blocks + 1)) / 1024) /
|
||||
(double)blockSize * (double)(results.Blocks + 1) / 1024 /
|
||||
(results.ProcessingTime / 1000), devicePath);
|
||||
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
|
||||
}
|
||||
@@ -383,7 +383,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
|
||||
double cmdDuration = 0;
|
||||
|
||||
if((results.Blocks - i) < blocksToRead) blocksToRead = (uint)(results.Blocks - i);
|
||||
if(results.Blocks - i < blocksToRead) blocksToRead = (uint)(results.Blocks - i);
|
||||
|
||||
#pragma warning disable RECS0018 // Comparison of floating point numbers with equality operator
|
||||
if(currentSpeed > results.MaxSpeed && currentSpeed != 0) results.MaxSpeed = currentSpeed;
|
||||
@@ -419,7 +419,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
|
||||
currentSpeed = ((double)blockSize * blocksToRead / (double)1048576) / (cmdDuration / (double)1000);
|
||||
currentSpeed = (double)blockSize * blocksToRead / (double)1048576 / (cmdDuration / (double)1000);
|
||||
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
||||
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,
|
||||
(((double)blockSize * (double)(results.Blocks + 1)) / 1024) /
|
||||
(double)blockSize * (double)(results.Blocks + 1) / 1024 /
|
||||
(results.ProcessingTime / 1000), devicePath);
|
||||
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
|
||||
}
|
||||
@@ -469,7 +469,7 @@ 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 = (((double)blockSize * (double)(results.Blocks + 1)) / 1048576) / results.ProcessingTime;
|
||||
results.AvgSpeed = (double)blockSize * (double)(results.Blocks + 1) / 1048576 / results.ProcessingTime;
|
||||
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
|
||||
results.SeekTimes = SEEK_TIMES;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user