Use UTF-8 string literals whenever possible.

This commit is contained in:
2023-09-29 18:27:27 +01:00
parent abbde2d4fe
commit c58d1f2261
3 changed files with 4 additions and 11 deletions

View File

@@ -2176,7 +2176,7 @@ public static class EVPD
decoded.Copyright = Encoding.ASCII.GetBytes(str);
else if(fwMatch.Success)
{
decoded.Component = Encoding.ASCII.GetBytes("Firmware");
decoded.Component = "Firmware"u8.ToArray();
decoded.Version = Encoding.ASCII.GetBytes(fwMatch.Groups["fw"].Value);
decoded.Date = Encoding.ASCII.GetBytes(fwMatch.Groups["date"].Value);
}
@@ -2184,7 +2184,7 @@ public static class EVPD
decoded.Variant = Encoding.ASCII.GetBytes(fwMatch.Groups["value"].Value);
else if(servoMatch.Success)
{
decoded.Component = Encoding.ASCII.GetBytes("Servo");
decoded.Component = "Servo"u8.ToArray();
decoded.Version = Encoding.ASCII.GetBytes(servoMatch.Groups["version"].Value);
}

View File

@@ -2400,10 +2400,7 @@ public static class Inquiry
if(response.HP_WORM)
sb.AppendFormat(Localization.Device_supports_WORM_version_0, response.HP_WORMVersion).AppendLine();
byte[] OBDRSign =
{
0x24, 0x44, 0x52, 0x2D, 0x31, 0x30
};
byte[] OBDRSign = "$DR-10"u8.ToArray();
if(OBDRSign.SequenceEqual(response.HP_OBDR))
sb.AppendLine(Localization.Device_supports_Tape_Disaster_Recovery);

View File

@@ -41,11 +41,7 @@ namespace Aaru.Decoders.SCSI;
public static partial class Modes
{
#region Apple Mode Page 0x30: Apple OEM String
static readonly byte[] AppleOEMString =
{
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x43, 0x4F, 0x4D, 0x50, 0x55, 0x54, 0x45, 0x52, 0x2C, 0x20, 0x49, 0x4E,
0x43, 0x2E
};
static readonly byte[] AppleOEMString = "APPLE COMPUTER, INC."u8.ToArray();
public static bool IsAppleModePage_30(byte[] pageResponse)
{