mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[doc] remove old sorting algorithm because it's not useful anymore
This commit is contained in:
@@ -568,75 +568,7 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
List<RomData> outroms = new List<RomData>();
|
List<RomData> outroms = new List<RomData>();
|
||||||
|
|
||||||
/*
|
// First sort the roms by size, crc, md5, sha1 (in order), if not sorted already
|
||||||
// First sort the roms by size, crc, sysid, srcid, md5, and sha1 (in order), if not sorted already
|
|
||||||
if (!presorted)
|
|
||||||
{
|
|
||||||
inroms.Sort(delegate (RomData x, RomData y)
|
|
||||||
{
|
|
||||||
if (x.Size == y.Size)
|
|
||||||
{
|
|
||||||
if (x.CRC == y.CRC)
|
|
||||||
{
|
|
||||||
// If the CRC is blank, use MD5 before SystemID
|
|
||||||
if (x.CRC == "")
|
|
||||||
{
|
|
||||||
if (x.MD5 == y.MD5)
|
|
||||||
{
|
|
||||||
// If the MD5 is blank, use SHA1 before SystemID
|
|
||||||
if (x.MD5 == "")
|
|
||||||
{
|
|
||||||
if (x.SHA1 == y.SHA1)
|
|
||||||
{
|
|
||||||
if (x.SystemID == y.SystemID)
|
|
||||||
{
|
|
||||||
return x.SourceID - y.SourceID;
|
|
||||||
}
|
|
||||||
return x.SystemID - y.SystemID;
|
|
||||||
}
|
|
||||||
return String.Compare(x.SHA1, y.SHA1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (x.SystemID == y.SystemID)
|
|
||||||
{
|
|
||||||
if (x.SourceID == y.SourceID)
|
|
||||||
{
|
|
||||||
return String.Compare(x.SHA1, y.SHA1);
|
|
||||||
}
|
|
||||||
return x.SourceID - y.SourceID;
|
|
||||||
}
|
|
||||||
return x.SystemID - y.SystemID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return String.Compare(x.MD5, y.MD5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (x.SystemID == y.SystemID)
|
|
||||||
{
|
|
||||||
if (x.SourceID == y.SourceID)
|
|
||||||
{
|
|
||||||
if (x.MD5 == y.MD5)
|
|
||||||
{
|
|
||||||
return String.Compare(x.SHA1, y.SHA1);
|
|
||||||
}
|
|
||||||
return String.Compare(x.MD5, y.MD5);
|
|
||||||
}
|
|
||||||
return x.SourceID - y.SourceID;
|
|
||||||
}
|
|
||||||
return x.SystemID - y.SystemID;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return String.Compare(x.CRC, y.CRC);
|
|
||||||
}
|
|
||||||
return (int)(x.Size - y.Size);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First sort the roms by size, crc, md5, sha1, sysid, srcid (in order), if not sorted already
|
|
||||||
if (!presorted)
|
if (!presorted)
|
||||||
{
|
{
|
||||||
inroms.Sort(delegate (RomData x, RomData y)
|
inroms.Sort(delegate (RomData x, RomData y)
|
||||||
|
|||||||
Reference in New Issue
Block a user