Clean up some core functionality

This commit is contained in:
Matt Nadareski
2024-10-19 12:07:43 -04:00
parent c9bff5e0aa
commit c8f708d1ae
5 changed files with 22 additions and 23 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SabreTools.Logging;
namespace SabreTools.Core.Tools
@@ -87,7 +86,7 @@ namespace SabreTools.Core.Tools
// Try to get the mapping attribute
MappingAttribute? attr = AttributeHelper<T>.GetAttribute(value);
if (attr?.Mappings == null || !attr.Mappings.Any())
if (attr?.Mappings == null || attr.Mappings.Length == 0)
continue;
// Loop through the mappings and add each
@@ -170,7 +169,7 @@ namespace SabreTools.Core.Tools
// Try to get the mapping attribute
MappingAttribute? attr = AttributeHelper<T>.GetAttribute(value);
if (attr?.Mappings == null || !attr.Mappings.Any())
if (attr?.Mappings == null || attr.Mappings.Length == 0)
continue;
// Use either the first or second item in the list