Refactor and code cleanup.

This commit is contained in:
2016-07-28 22:25:26 +01:00
parent af68104f4e
commit 1ad3366dae
57 changed files with 303 additions and 284 deletions

View File

@@ -88,7 +88,9 @@ namespace DiscImageChef.Decoders.SCSI.SSC
sb.AppendFormat("Device's minimum block size is {0} bytes", decoded.Value.minBlockLen).AppendLine();
if(decoded.Value.granularity > 0)
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 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();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
}
return sb.ToString();

View File

@@ -166,8 +166,10 @@ namespace DiscImageChef.Decoders.SCSI.SSC
if(descriptor.defaultDensity)
sb.AppendLine("\tThis is the default density on the drive");
sb.AppendFormat("\tDensity has {0} bits per mm, with {1} tracks in a {2} mm width tape",
#pragma warning disable IDE0004 // Remove Unnecessary Cast
descriptor.bpmm, descriptor.tracks, (double)((double)descriptor.width / (double)10)).AppendLine();
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("\tDensity maximum capacity is {0} megabytes", descriptor.capacity).AppendLine();
sb.AppendFormat("\tDensity description: {0}", descriptor.description).AppendLine();
sb.AppendLine();
}
@@ -256,8 +258,10 @@ namespace DiscImageChef.Decoders.SCSI.SSC
}
sb.AppendFormat("\tMedium has a nominal length of {0} m in a {1} mm width tape",
#pragma warning disable IDE0004 // Remove Unnecessary Cast
descriptor.length, (double)((double)descriptor.width / (double)10)).AppendLine();
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
#pragma warning restore IDE0004 // Remove Unnecessary Cast
sb.AppendFormat("\tMedium description: {0}", descriptor.description).AppendLine();
sb.AppendLine();
}