mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
Invert 'if' statement to reduce nesting.
This commit is contained in:
20
CD/Sector.cs
20
CD/Sector.cs
@@ -393,12 +393,12 @@ public static class Sector
|
|||||||
|
|
||||||
for(var i = 16; i < 2352; i++)
|
for(var i = 16; i < 2352; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] != 0x00)
|
if(buffer[i] == 0x00)
|
||||||
{
|
continue;
|
||||||
empty = false;
|
|
||||||
|
|
||||||
break;
|
empty = false;
|
||||||
}
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.AppendLine(empty ? Localization.Correct_sector_contents : Localization.Incorrect_sector_contents);
|
sb.AppendLine(empty ? Localization.Correct_sector_contents : Localization.Incorrect_sector_contents);
|
||||||
@@ -411,12 +411,12 @@ public static class Sector
|
|||||||
|
|
||||||
for(var i = 2068; i < 2076; i++)
|
for(var i = 2068; i < 2076; i++)
|
||||||
{
|
{
|
||||||
if(buffer[i] != 0x00)
|
if(buffer[i] == 0x00)
|
||||||
{
|
continue;
|
||||||
empty = false;
|
|
||||||
|
|
||||||
break;
|
empty = false;
|
||||||
}
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.AppendLine(empty ? Localization.Correct_zero_fill : Localization.Incorrect_zero_fill);
|
sb.AppendLine(empty ? Localization.Correct_zero_fill : Localization.Incorrect_zero_fill);
|
||||||
|
|||||||
Reference in New Issue
Block a user