mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Avoid loop in common path of GetItemsForBucket
This commit is contained in:
@@ -243,13 +243,13 @@ namespace SabreTools.DatFiles
|
||||
var items = _items[bucketName];
|
||||
#endif
|
||||
|
||||
if (items == null)
|
||||
return [];
|
||||
if (items == null || !filter)
|
||||
return [.. items ?? []];
|
||||
|
||||
var datItems = new List<DatItem>();
|
||||
foreach (DatItem item in items)
|
||||
{
|
||||
if (!filter || item.GetBoolFieldValue(DatItem.RemoveKey) != true)
|
||||
if (item.GetBoolFieldValue(DatItem.RemoveKey) != true)
|
||||
datItems.Add(item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user