From e54473682cf11b797975d52c568e907bd69f404c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 12 Nov 2024 16:11:15 -0500 Subject: [PATCH] Use TrueForAll --- SabreTools.Serialization/Serializers/IRD.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SabreTools.Serialization/Serializers/IRD.cs b/SabreTools.Serialization/Serializers/IRD.cs index 5e64df16..8ee21446 100644 --- a/SabreTools.Serialization/Serializers/IRD.cs +++ b/SabreTools.Serialization/Serializers/IRD.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Linq; using System.Text; namespace SabreTools.Serialization.Serializers @@ -38,11 +37,11 @@ namespace SabreTools.Serialization.Serializers return null; if (obj.Footer == null || obj.Footer.Length != obj.FooterLength) return null; - if (obj.RegionHashes == null || obj.RegionHashes.Length != obj.RegionCount || obj.RegionHashes.Any(h => h == null || h.Length != 16)) + if (obj.RegionHashes == null || obj.RegionHashes.Length != obj.RegionCount || !Array.TrueForAll(obj.RegionHashes, h => h == null || h.Length != 16)) return null; if (obj.FileKeys == null || obj.FileKeys.Length != obj.FileCount) return null; - if (obj.FileHashes == null || obj.FileHashes.Length != obj.FileCount || obj.FileHashes.Any(h => h == null || h.Length != 16)) + if (obj.FileHashes == null || obj.FileHashes.Length != obj.FileCount || !Array.TrueForAll(obj.FileHashes, h => h == null || h.Length != 16)) return null; if (obj.PIC == null || obj.PIC.Length != 115) return null;