Rename "CRC" to "CRC32" where appropriate

This commit is contained in:
Matt Nadareski
2026-04-06 07:44:19 -04:00
parent 6a7d6e16b7
commit e2b2f4d8a5
61 changed files with 375 additions and 373 deletions

View File

@@ -190,7 +190,7 @@ namespace SabreTools.Metadata.DatItems
key = HashType.CRC16.ZeroString;
break;
case ItemKey.CRC:
case ItemKey.CRC32:
key = HashType.CRC32.ZeroString;
break;

View File

@@ -27,7 +27,7 @@ namespace SabreTools.Metadata.DatItems
Machine,
CRC16,
CRC,
CRC32,
CRC64,
MD2,
MD4,

View File

@@ -150,7 +150,7 @@ namespace SabreTools.Metadata.DatItems.Formats
rom.Name = $"{Id}.{Extension}";
rom.Size = Size;
rom.CRC = CRC;
rom.CRC32 = CRC;
rom.MD5 = MD5;
rom.SHA1 = SHA1;
rom.SHA256 = SHA256;
@@ -297,7 +297,7 @@ namespace SabreTools.Metadata.DatItems.Formats
// Now determine what the key should be based on the bucketedBy value
switch (bucketedBy)
{
case ItemKey.CRC:
case ItemKey.CRC32:
key = CRC;
break;

View File

@@ -92,18 +92,18 @@ namespace SabreTools.Metadata.DatItems.Formats
set => _internal.Comment = value;
}
public string? CRC
{
get => _internal.CRC;
set => _internal.CRC = value;
}
public string? CRC16
{
get => _internal.CRC16;
set => _internal.CRC16 = value;
}
public string? CRC32
{
get => _internal.CRC32;
set => _internal.CRC32 = value;
}
public string? CRC64
{
get => _internal.CRC64;
@@ -691,9 +691,9 @@ namespace SabreTools.Metadata.DatItems.Formats
if (crc16 is not null)
CRC16 = NormalizeHashData(crc16, 4);
string? crc = CRC;
if (crc is not null)
CRC = TextHelper.NormalizeCRC32(crc);
string? crc32 = CRC32;
if (crc32 is not null)
CRC32 = TextHelper.NormalizeCRC32(crc32);
// TODO: This should be normalized to CRC-64
string? crc64 = CRC64;
@@ -747,9 +747,9 @@ namespace SabreTools.Metadata.DatItems.Formats
if (crc16 is not null)
CRC16 = NormalizeHashData(crc16, 4);
string? crc = CRC;
if (crc is not null)
CRC = TextHelper.NormalizeCRC32(crc);
string? crc32 = CRC32;
if (crc32 is not null)
CRC32 = TextHelper.NormalizeCRC32(crc32);
// TODO: This should be normalized to CRC-64
string? crc64 = CRC64;
@@ -957,8 +957,8 @@ namespace SabreTools.Metadata.DatItems.Formats
key = CRC16;
break;
case ItemKey.CRC:
key = CRC;
case ItemKey.CRC32:
key = CRC32;
break;
case ItemKey.CRC64: