mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-08 18:06:41 +00:00
Compare machines in DatItem equality
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user