REFACTOR: Removed unneeded pragmas.

This commit is contained in:
2017-12-21 16:14:29 +00:00
parent bcbda18e4d
commit 7553983bd8
20 changed files with 0 additions and 104 deletions

View File

@@ -99,9 +99,7 @@ namespace DiscImageChef.Devices
if(sense) return true;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
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);
cdb[8] = (byte)(buffer.Length & 0xFF);
@@ -156,9 +154,7 @@ namespace DiscImageChef.Devices
if(sense) return true;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
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);
cdb[9] = (byte)(buffer.Length & 0xFF);
@@ -318,9 +314,7 @@ namespace DiscImageChef.Devices
out sense);
Error = LastError != 0;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
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];
if(buffer.Length <= tmpBuffer.Length)
@@ -381,9 +375,7 @@ namespace DiscImageChef.Devices
out sense);
Error = LastError != 0;
#pragma warning disable IDE0004 // Cast is necessary or an invalid bitshift happens
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);