mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
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:
@@ -112,9 +112,6 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
protected override bool HasRequiredFields(DatItem datItem)
|
protected override bool HasRequiredFields(DatItem datItem)
|
||||||
{
|
{
|
||||||
return true;
|
|
||||||
|
|
||||||
// TODO: Use this code once `strict` rules determined
|
|
||||||
return (_hash, datItem.ItemType) switch
|
return (_hash, datItem.ItemType) switch
|
||||||
{
|
{
|
||||||
(Hash.CRC, ItemType.Rom) => !string.IsNullOrEmpty((datItem as Rom)?.CRC),
|
(Hash.CRC, ItemType.Rom) => !string.IsNullOrEmpty((datItem as Rom)?.CRC),
|
||||||
|
|||||||
Reference in New Issue
Block a user