REFACTOR: Invert 'if' statement to reduce nesting.

This commit is contained in:
2017-12-21 06:06:19 +00:00
parent 9cd1869d1d
commit 4d886dae25
138 changed files with 9447 additions and 9806 deletions

View File

@@ -72,12 +72,11 @@ namespace DiscImageChef.Partitions
magic = BitConverter.ToUInt32(pdsector, 4);
DicConsole.DebugWriteLine("VTOC plugin", "sanity at {0} is 0x{1:X8} (should be 0x{2:X8} or 0x{3:X8})",
i + sectorOffset, magic, PD_MAGIC, PD_CIGAM);
if(magic == PD_MAGIC || magic == PD_CIGAM)
{
magic_found = true;
pdloc = i;
break;
}
if(magic != PD_MAGIC && magic != PD_CIGAM) continue;
magic_found = true;
pdloc = i;
break;
}
if(!magic_found) return false;