REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -55,11 +55,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
public static BlockLimitsData? Decode(byte[] response)
{
if(response == null)
return null;
if(response == null) return null;
if(response.Length != 6)
return null;
if(response.Length != 6) return null;
BlockLimitsData dec = new BlockLimitsData();
@@ -72,8 +70,7 @@ namespace DiscImageChef.Decoders.SCSI.SSC
public static string Prettify(BlockLimitsData? decoded)
{
if(decoded == null)
return null;
if(decoded == null) return null;
StringBuilder sb = new StringBuilder();
@@ -83,13 +80,14 @@ namespace DiscImageChef.Decoders.SCSI.SSC
{
if(decoded.Value.maxBlockLen > 0)
sb.AppendFormat("Device's maximum block size is {0} bytes", decoded.Value.maxBlockLen).AppendLine();
else
sb.AppendLine("Device does not specify a maximum block size");
else sb.AppendLine("Device does not specify a maximum block size");
sb.AppendFormat("Device's minimum block size is {0} bytes", decoded.Value.minBlockLen).AppendLine();
if(decoded.Value.granularity > 0)
#pragma warning disable IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes", decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity)).AppendLine();
sb.AppendFormat("Device's needs a block size granularity of 2^{0} ({1}) bytes",
decoded.Value.granularity, Math.Pow(2, (double)decoded.Value.granularity))
.AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
}
@@ -101,5 +99,4 @@ namespace DiscImageChef.Decoders.SCSI.SSC
return Prettify(Decode(response));
}
}
}
}