Enforce required fields for Hashfile

I was going back and forth on this, but honestly, this is the one set of types that is really meaningless if the hashes are missing.
This commit is contained in:
Matt Nadareski
2022-11-03 16:15:49 -07:00
parent b1f2836261
commit f1d37a7bb6

View File

@@ -112,9 +112,6 @@ namespace SabreTools.DatFiles.Formats
/// <inheritdoc/>
protected override bool HasRequiredFields(DatItem datItem)
{
return true;
// TODO: Use this code once `strict` rules determined
return (_hash, datItem.ItemType) switch
{
(Hash.CRC, ItemType.Rom) => !string.IsNullOrEmpty((datItem as Rom)?.CRC),