IntersectWith should be UnionWith

This commit is contained in:
Matt Nadareski
2024-12-06 12:46:58 -05:00
parent 9a363a0ed8
commit b6c6a0160b
4 changed files with 8 additions and 8 deletions

View File

@@ -1286,7 +1286,7 @@ namespace SabreTools.DatFiles
if (devItems == null)
continue;
newDeviceReferences.IntersectWith(devItems
newDeviceReferences.UnionWith(devItems
.Where(i => i is DeviceRef)
.Select(i => (i as DeviceRef)!.GetName()!));
@@ -1336,7 +1336,7 @@ namespace SabreTools.DatFiles
if (slotItems == null)
continue;
newSlotOptions.IntersectWith(slotItems
newSlotOptions.UnionWith(slotItems
.Where(i => i is Slot)
.Where(s => (s as Slot)!.SlotOptionsSpecified)
.SelectMany(s => (s as Slot)!.GetFieldValue<SlotOption[]?>(Models.Metadata.Slot.SlotOptionKey)!)