Update enum handling, part 1

This commit is contained in:
Matt Nadareski
2023-04-20 10:34:37 -04:00
parent 8921a09118
commit 1f601dfa3f
11 changed files with 1332 additions and 1123 deletions

View File

@@ -212,7 +212,7 @@ namespace SabreTools.DatFiles.Formats
bool containsItems = false;
Machine machine = new()
{
MachineType = (resource ? MachineType.Bios : MachineType.NULL),
MachineType = (resource ? MachineType.Bios : MachineType.None),
};
// If there's no subtree to the header, skip it
@@ -276,7 +276,10 @@ namespace SabreTools.DatFiles.Formats
string itemKey = cmpr.InternalName;
// Create the proper DatItem based on the type
ItemType itemType = itemKey.AsItemType() ?? ItemType.Rom;
ItemType itemType = itemKey.AsItemType();
if (itemType == ItemType.NULL)
itemType = ItemType.Rom;
DatItem item = DatItem.Create(itemType);
// Then populate it with information