Compare machines in DatItem equality

This commit is contained in:
Matt Nadareski
2026-04-02 16:25:52 -04:00
parent 355aa4b94c
commit 61ea4b2668

View File

@@ -199,6 +199,12 @@ namespace SabreTools.Metadata.DatItems
if (other is not DatItem otherItem)
return false;
// Compare machines
if ((Machine is null) ^ (otherItem.Machine is null))
return false;
if (Machine is not null && !Machine.Equals(otherItem.Machine))
return false;
// Compare internal models
return _internal.Equals(otherItem);
}
@@ -222,6 +228,12 @@ namespace SabreTools.Metadata.DatItems
if (selfType != otherType)
return false;
// Compare machines
if ((Machine is null) ^ (other.Machine is null))
return false;
if (Machine is not null && !Machine.Equals(other.Machine))
return false;
// Compare the internal models
return _internal.EqualTo(other._internal);
}