Remove redundant parentheses.

This commit is contained in:
2021-08-17 14:27:19 +01:00
parent 6dd5fb5c5c
commit c1287c00cf
61 changed files with 201 additions and 201 deletions

View File

@@ -170,7 +170,7 @@ namespace Aaru.Gui.Controls
{
case nameof(Blocks):
if(_maxBlocks == 0)
_maxBlocks = (ulong)((Width / _blockSize) * (Height / _blockSize));
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
if(Blocks > _maxBlocks)
{
@@ -225,7 +225,7 @@ namespace Aaru.Gui.Controls
if((int?)_bitmap?.Size.Height != (int)Height ||
(int?)_bitmap?.Size.Width != (int)Width)
{
_maxBlocks = (ulong)((Width / _blockSize) * (Height / _blockSize));
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
CreateBitmap();
}
@@ -398,7 +398,7 @@ namespace Aaru.Gui.Controls
void CreateBitmap()
{
if(_maxBlocks == 0)
_maxBlocks = (ulong)((Width / _blockSize) * (Height / _blockSize));
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
_bitmap?.Dispose();
@@ -423,7 +423,7 @@ namespace Aaru.Gui.Controls
{
for(ulong x = 0; x < Width; x += _blockSize)
{
ulong currentBlockValue = ((y * clustersPerRow) / _blockSize) + (x / _blockSize);
ulong currentBlockValue = (y * clustersPerRow / _blockSize) + (x / _blockSize);
if(currentBlockValue >= _maxBlocks ||
currentBlockValue >= Blocks)

View File

@@ -485,7 +485,7 @@ namespace Aaru.Gui.ViewModels.Windows
if(ChecksumTracksChecked)
trackChecksum = new Checksum(enabledChecksums);
ulong sectors = (currentTrack.TrackEndSector - currentTrack.TrackStartSector) + 1;
ulong sectors = currentTrack.TrackEndSector - currentTrack.TrackStartSector + 1;
ulong doneSectors = 0;
while(doneSectors < sectors)

View File

@@ -1192,7 +1192,7 @@ namespace Aaru.Gui.ViewModels.Windows
foreach(Track track in tracks.TakeWhile(track => !_cancel))
{
doneSectors = 0;
ulong trackSectors = (track.TrackEndSector - track.TrackStartSector) + 1;
ulong trackSectors = track.TrackEndSector - track.TrackStartSector + 1;
await Dispatcher.UIThread.InvokeAsync(() =>
{
@@ -1313,7 +1313,7 @@ namespace Aaru.Gui.ViewModels.Windows
foreach(Track track in tracks.TakeWhile(track => !_cancel))
{
doneSectors = 0;
ulong trackSectors = (track.TrackEndSector - track.TrackStartSector) + 1;
ulong trackSectors = track.TrackEndSector - track.TrackStartSector + 1;
byte[] sector;
bool result;