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

@@ -129,11 +129,10 @@ namespace DiscImageChef.Partitions
Scheme = Name
};
part.Offset = part.Start * (ulong)sector.Length;
if(entry.magic == LINUX_MAGIC || entry.magic == SWAP_MAGIC)
{
partitions.Add(part);
counter++;
}
if(entry.magic != LINUX_MAGIC && entry.magic != SWAP_MAGIC) continue;
partitions.Add(part);
counter++;
}
break;
@@ -160,11 +159,10 @@ namespace DiscImageChef.Partitions
Scheme = Name
};
part.Offset = part.Start * (ulong)sector.Length;
if(entry.length > 0)
{
partitions.Add(part);
counter++;
}
if(entry.length <= 0) continue;
partitions.Add(part);
counter++;
}
break;