Reduce complexity in duplicate checking

This commit is contained in:
Matt Nadareski
2025-01-06 12:36:04 -05:00
parent 9545d86440
commit 9afca918a6

View File

@@ -318,14 +318,15 @@ namespace SabreTools.DatItems
int pos = -1;
for (int i = 0; i < outfiles.Count; i++)
{
// Get the next item
DatItem lastrom = outfiles[i];
// Get the duplicate status
dupetype = item.GetDuplicateStatus(lastrom);
if (dupetype == 0x00)
continue;
// If it's a duplicate, skip adding it to the output but add any missing information
if (dupetype != 0x00)
{
saveditem = lastrom;
pos = i;
@@ -359,7 +360,6 @@ namespace SabreTools.DatItems
break;
}
}
// If no duplicate is found, add it to the list
if (dupetype == 0x00)