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
|
try
|
||||||
{
|
{
|
||||||
RomData comp = (RomData)obj;
|
RomData comp = (RomData)obj;
|
||||||
if (this.Game == comp.Game &&
|
|
||||||
this.Name == comp.Name &&
|
if (this.SystemID == comp.SystemID)
|
||||||
RomTools.IsDuplicate(this, comp))
|
|
||||||
{
|
{
|
||||||
return 0;
|
if (this.SourceID == comp.SourceID)
|
||||||
}
|
{
|
||||||
else
|
if (this.Game == comp.Game)
|
||||||
{
|
{
|
||||||
return 1;
|
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
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user