mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Structs] Make RomData comparable
This commit is contained in:
@@ -30,16 +30,24 @@ namespace SabreTools.Helper
|
||||
try
|
||||
{
|
||||
RomData comp = (RomData)obj;
|
||||
if (this.Game == comp.Game &&
|
||||
this.Name == comp.Name &&
|
||||
RomTools.IsDuplicate(this, comp))
|
||||
|
||||
if (this.SystemID == comp.SystemID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
if (this.SourceID == comp.SourceID)
|
||||
{
|
||||
if (this.Game == comp.Game)
|
||||
{
|
||||
if (this.Name == comp.Name)
|
||||
{
|
||||
return (RomTools.IsDuplicate(this, comp) ? 0 : 1);
|
||||
}
|
||||
return String.Compare(this.Name, comp.Name);
|
||||
}
|
||||
return String.Compare(this.Game, comp.Game);
|
||||
}
|
||||
return this.SourceID - comp.SourceID;
|
||||
}
|
||||
return this.SystemID - comp.SystemID;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user