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

@@ -261,14 +261,12 @@ namespace DiscImageChef.DiscImages
#region Unsupported features
public override byte[] ReadDiskTag(MediaTagType tag)
{
if(ImageInfo.ReadableMediaTags.Contains(tag) && tag == MediaTagType.ATA_IDENTIFY)
{
byte[] buffer = new byte[512];
Array.Copy(identify, 0, buffer, 0, 512);
return buffer;
}
if(!ImageInfo.ReadableMediaTags.Contains(tag) || tag != MediaTagType.ATA_IDENTIFY)
throw new FeatureUnsupportedImageException("Feature not supported by image format");
throw new FeatureUnsupportedImageException("Feature not supported by image format");
byte[] buffer = new byte[512];
Array.Copy(identify, 0, buffer, 0, 512);
return buffer;
}
public override byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag)