mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Avoid unnecessary rereads in RemoveItemsFromCloneOfChild
This commit is contained in:
@@ -1112,14 +1112,13 @@ namespace SabreTools.DatFiles
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Reset the items list each time an item is removed so the index is accurate
|
|
||||||
items = GetItemsForBucket(bucket);
|
|
||||||
|
|
||||||
// Find the next index that matches the item
|
// Find the next index that matches the item
|
||||||
int index = items.FindIndex(i => i.Equals(item));
|
int index = items.FindIndex(i => i.Equals(item));
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Remove the item from the local and internal lists
|
||||||
|
items.RemoveAt(index);
|
||||||
RemoveItem(bucket, items[index], index);
|
RemoveItem(bucket, items[index], index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user