mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Handle known enumerable types better
This commit is contained in:
@@ -478,7 +478,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
continue;
|
||||
|
||||
// Resolve the names in the block
|
||||
items = [.. DatItem.ResolveNamesDB(items.ToList())];
|
||||
items = [.. DatItem.ResolveNamesDB([.. items])];
|
||||
|
||||
for (int index = 0; index < items.Length; index++)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SabreTools.DatItems;
|
||||
using SabreTools.DatItems.Formats;
|
||||
|
||||
@@ -122,9 +122,9 @@ namespace SabreTools.DatFiles.Formats
|
||||
if (dipSwitch.ValuesSpecified)
|
||||
{
|
||||
var dipValues = dipSwitch.GetFieldValue<DipValue[]?>(Models.Metadata.DipSwitch.DipValueKey);
|
||||
if (dipValues!.Any(dv => string.IsNullOrEmpty(dv.GetName())))
|
||||
if (Array.Find(dipValues!, dv => string.IsNullOrEmpty(dv.GetName())) != null)
|
||||
missingFields.Add(Models.Metadata.DipValue.NameKey);
|
||||
if (dipValues!.Any(dv => string.IsNullOrEmpty(dv.GetStringFieldValue(Models.Metadata.DipValue.ValueKey))))
|
||||
if (Array.Find(dipValues!, dv => string.IsNullOrEmpty(dv.GetStringFieldValue(Models.Metadata.DipValue.ValueKey))) != null)
|
||||
missingFields.Add(Models.Metadata.DipValue.ValueKey);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user