[Refactor] Remove redundant braces and apply brace style.

This commit is contained in:
2024-05-01 04:51:19 +01:00
parent 8e0e249b9f
commit b34179ebfe
30 changed files with 68 additions and 125 deletions

View File

@@ -181,9 +181,8 @@ public partial class Device
if(string.IsNullOrEmpty(dev.Serial))
dev.Serial = dev.UsbSerialString;
else
{
foreach(char c in dev.Serial.Where(c => !char.IsControl(c))) dev.Serial = $"{dev.Serial}{c:X2}";
}
foreach(char c in dev.Serial.Where(c => !char.IsControl(c)))
dev.Serial = $"{dev.Serial}{c:X2}";
}
if(dev.IsFireWire)
@@ -195,9 +194,8 @@ public partial class Device
if(string.IsNullOrEmpty(dev.Serial))
dev.Serial = $"{dev.FirewireGuid:X16}";
else
{
foreach(char c in dev.Serial.Where(c => !char.IsControl(c))) dev.Serial = $"{dev.Serial}{c:X2}";
}
foreach(char c in dev.Serial.Where(c => !char.IsControl(c)))
dev.Serial = $"{dev.Serial}{c:X2}";
}
// Some optical drives are not getting the correct serial, and IDENTIFY PACKET DEVICE is blocked without