Make filters more sensible, reduce allocated items

This change ended up being three-fold:
1. Remove the entirely unused header field filters
2. Move filter running to their appropriate filter classes
3. Separate out DatItem filters into more managable private methods
This commit is contained in:
Matt Nadareski
2021-01-29 13:38:47 -08:00
parent 385b34336f
commit a26833b8a8
8 changed files with 1392 additions and 1387 deletions

View File

@@ -187,7 +187,7 @@ namespace SabreTools.DatTools
public static bool ApplyFilters(DatFile datFile, Cleaner cleaner, bool perMachine = false, bool throwOnError = false)
{
// If we have a null cleaner or filters, return false
if (cleaner == null || cleaner.DatHeaderFilter == null || cleaner.MachineFilter == null || cleaner.DatItemFilter == null)
if (cleaner == null || cleaner.MachineFilter == null || cleaner.DatItemFilter == null)
return false;
// If we're filtering per machine, bucket by machine first