REFACTOR: Remove unneeded code.

This commit is contained in:
2017-12-21 14:30:38 +00:00
parent 35ce7db892
commit dcd053b20d
343 changed files with 2842 additions and 2588 deletions

View File

@@ -100,7 +100,7 @@ namespace DiscImageChef.Devices
if(sense) return true;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
ushort confLength = (ushort)(((int)buffer[2] << 8) + buffer[3] + 4);
ushort confLength = (ushort)((buffer[2] << 8) + buffer[3] + 4);
#pragma warning restore IDE0004 // Cast is necessary or an invalid bitshift happens
buffer = new byte[confLength];
cdb[7] = (byte)((buffer.Length & 0xFF00) >> 8);
@@ -157,7 +157,7 @@ namespace DiscImageChef.Devices
if(sense) return true;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
ushort strctLength = (ushort)(((int)buffer[0] << 8) + buffer[1] + 2);
ushort strctLength = (ushort)((buffer[0] << 8) + buffer[1] + 2);
#pragma warning restore IDE0004 // Cast is necessary or an invalid bitshift happens
buffer = new byte[strctLength];
cdb[8] = (byte)((buffer.Length & 0xFF00) >> 8);
@@ -319,7 +319,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
uint strctLength = (uint)(((int)tmpBuffer[0] << 8) + tmpBuffer[1] + 2);
uint strctLength = (uint)((tmpBuffer[0] << 8) + tmpBuffer[1] + 2);
#pragma warning restore IDE0004 // Cast is necessary or an invalid bitshift happens
buffer = new byte[strctLength];
@@ -382,7 +382,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
uint strctLength = (uint)(((int)tmpBuffer[0] << 8) + tmpBuffer[1] + 2);
uint strctLength = (uint)((tmpBuffer[0] << 8) + tmpBuffer[1] + 2);
#pragma warning restore IDE0004 // Cast is necessary or an invalid bitshift happens
buffer = new byte[strctLength];
Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length);