[RomTools] Don't need to sort roms

Because we no longer rely explicitly on rom order to make sure there are no duplicates, there's no need to spend the extra step of sorting the list first.
This commit is contained in:
Matt Nadareski
2016-06-16 17:41:23 -07:00
parent 1ae76f9025
commit 1b086e56b4

View File

@@ -155,25 +155,7 @@ namespace SabreTools.Helper
// Create output list
List<RomData> outroms = new List<RomData>();
// First sort the roms by size, crc, md5, sha1 (in order)
inroms.Sort(delegate (RomData x, RomData y)
{
if (x.Size == y.Size)
{
if (x.CRC == y.CRC)
{
if (x.MD5 == y.MD5)
{
return String.Compare(x.SHA1, y.SHA1);
}
return String.Compare(x.MD5, y.MD5);
}
return String.Compare(x.CRC, y.CRC);
}
return (int)(x.Size - y.Size);
});
// Then, deduplicate them by checking to see if data matches
// Then deduplicate them by checking to see if data matches previous saved roms
foreach (RomData rom in inroms)
{
// If it's a nodump, add and skip