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

@@ -91,11 +91,10 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendFormat("\tVendor-specific mode control: {0}", page.ModeControl);
sb.AppendFormat("\tVendor-specific velocity setting: {0}", page.VelocitySetting);
if(page.EncryptionCapable)
{
sb.AppendLine("\tDrive supports encryption");
if(page.EncryptionEnabled) sb.AppendLine("\tDrive has encryption enabled");
}
if(!page.EncryptionCapable) return sb.ToString();
sb.AppendLine("\tDrive supports encryption");
if(page.EncryptionEnabled) sb.AppendLine("\tDrive has encryption enabled");
return sb.ToString();
}