diff --git a/ArcFormats/Amaterasu/ArcAMI.cs b/ArcFormats/Amaterasu/ArcAMI.cs index 7def95b2..f4bd4b6d 100644 --- a/ArcFormats/Amaterasu/ArcAMI.cs +++ b/ArcFormats/Amaterasu/ArcAMI.cs @@ -179,7 +179,7 @@ namespace GameRes.Formats.Amaterasu var file_table = new SortedDictionary(); if (null != base_archive) { - foreach (var entry in base_archive.Dir.Cast()) + foreach (AmiEntry entry in base_archive.Dir) file_table[entry.Id] = entry; } int update_count = UpdateFileTable (file_table, list); diff --git a/ArcFormats/Ankh/ArcGRP.cs b/ArcFormats/Ankh/ArcGRP.cs index 5748df0c..e1dcf007 100644 --- a/ArcFormats/Ankh/ArcGRP.cs +++ b/ArcFormats/Ankh/ArcGRP.cs @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.IO; -using System.Linq; using GameRes.Utility; namespace GameRes.Formats.Ankh @@ -78,7 +77,7 @@ namespace GameRes.Formats.Ankh } if (0 == dir.Count) return null; - foreach (var entry in dir.Cast()) + foreach (PackedEntry entry in dir) { if (entry.Size < 4) continue; diff --git a/ArcFormats/ArcAil.cs b/ArcFormats/ArcAil.cs index 5411559b..797c99aa 100644 --- a/ArcFormats/ArcAil.cs +++ b/ArcFormats/ArcAil.cs @@ -79,7 +79,7 @@ namespace GameRes.Formats.Ail return null; byte[] preview = new byte[16]; byte[] sign_buf = new byte[4]; - foreach (var entry in dir.Cast()) + foreach (PackedEntry entry in dir) { uint extra = 6; if (extra > entry.Size) diff --git a/ArcFormats/Propeller/ArcMGR.cs b/ArcFormats/Propeller/ArcMGR.cs index c99752c9..3849f754 100644 --- a/ArcFormats/Propeller/ArcMGR.cs +++ b/ArcFormats/Propeller/ArcMGR.cs @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.IO; -using System.Linq; using GameRes.Utility; namespace GameRes.Formats.Propeller @@ -79,7 +78,7 @@ namespace GameRes.Formats.Propeller { dir.Add (new PackedEntry { Name = base_name+".bmp", Type = "image", Offset = current }); } - foreach (var entry in dir.Cast()) + foreach (PackedEntry entry in dir) { entry.UnpackedSize = file.View.ReadUInt32 (entry.Offset); entry.Size = file.View.ReadUInt32 (entry.Offset+4); diff --git a/ArcFormats/SHSystem/ArcHXP.cs b/ArcFormats/SHSystem/ArcHXP.cs index 66c9f0b8..8d9e2e24 100644 --- a/ArcFormats/SHSystem/ArcHXP.cs +++ b/ArcFormats/SHSystem/ArcHXP.cs @@ -77,7 +77,7 @@ namespace GameRes.Formats.SHSystem static protected void DetectFileTypes (ArcView file, List dir) { byte[] signature_buffer = new byte[4]; - foreach (var entry in dir.Cast()) + foreach (PackedEntry entry in dir) { uint packed_size = file.View.ReadUInt32 (entry.Offset); uint unpacked_size = file.View.ReadUInt32 (entry.Offset+4); diff --git a/ArcFormats/Yuka/ArcYKC.cs b/ArcFormats/Yuka/ArcYKC.cs index 8fae5c1c..eafd176d 100644 --- a/ArcFormats/Yuka/ArcYKC.cs +++ b/ArcFormats/Yuka/ArcYKC.cs @@ -79,7 +79,7 @@ namespace GameRes.Formats.Yuka index_offset += 0x14; } // read in two cycles to avoid memory mapped file page switching when accessing names - foreach (var entry in dir.Cast()) + foreach (YukaEntry entry in dir) { entry.Name = file.View.ReadString (entry.NameOffset, entry.NameLength); entry.Type = FormatCatalog.Instance.GetTypeFromName (entry.Name); diff --git a/ArcFormats/Zyx/ArcBDF.cs b/ArcFormats/Zyx/ArcBDF.cs index 734dc998..c392d11b 100644 --- a/ArcFormats/Zyx/ArcBDF.cs +++ b/ArcFormats/Zyx/ArcBDF.cs @@ -73,7 +73,7 @@ namespace GameRes.Formats.Zyx } pixels = FirstFrame.Clone() as byte[]; int i = 1; - foreach (var entry in Dir.Skip(1).Cast()) + foreach (BdfFrame entry in Dir.Skip(1)) { if (i++ > frame.Number) break;