diff --git a/src/LibHac/IO/RomFs/HierarchicalRomFileTable.cs b/src/LibHac/IO/RomFs/HierarchicalRomFileTable.cs index 43e998da..94571480 100644 --- a/src/LibHac/IO/RomFs/HierarchicalRomFileTable.cs +++ b/src/LibHac/IO/RomFs/HierarchicalRomFileTable.cs @@ -7,24 +7,14 @@ namespace LibHac.IO.RomFs { public class HierarchicalRomFileTable { - private IStorage DirHashTableStorage { get; } - private IStorage DirEntryTableStorage { get; } - private IStorage FileHashTableStorage { get; } - private IStorage FileEntryTableStorage { get; } - private RomFsDictionary FileTable { get; } private RomFsDictionary DirectoryTable { get; } public HierarchicalRomFileTable(IStorage dirHashTable, IStorage dirEntryTable, IStorage fileHashTable, IStorage fileEntryTable) { - DirHashTableStorage = dirHashTable; - DirEntryTableStorage = dirEntryTable; - FileHashTableStorage = fileHashTable; - FileEntryTableStorage = fileEntryTable; - - FileTable = new RomFsDictionary(FileHashTableStorage, FileEntryTableStorage); - DirectoryTable = new RomFsDictionary(DirHashTableStorage, DirEntryTableStorage); + FileTable = new RomFsDictionary(fileHashTable, fileEntryTable); + DirectoryTable = new RomFsDictionary(dirHashTable, dirEntryTable); } public HierarchicalRomFileTable() : this(0, 0) { } diff --git a/src/LibHac/IO/RomFs/RomFsBuilder.cs b/src/LibHac/IO/RomFs/RomFsBuilder.cs index 45a33d5a..3e8bfbe5 100644 --- a/src/LibHac/IO/RomFs/RomFsBuilder.cs +++ b/src/LibHac/IO/RomFs/RomFsBuilder.cs @@ -11,8 +11,8 @@ namespace LibHac.IO.RomFs private const int HeaderSize = 0x50; private const int HeaderWithPaddingSize = 0x200; - public List Sources { get; } = new List(); - public HierarchicalRomFileTable FileTable { get; } = new HierarchicalRomFileTable(); + private List Sources { get; } = new List(); + private HierarchicalRomFileTable FileTable { get; } = new HierarchicalRomFileTable(); private long CurrentOffset { get; set; } public RomFsBuilder() { } diff --git a/src/LibHac/IO/RomFs/RomFsDictionary.cs b/src/LibHac/IO/RomFs/RomFsDictionary.cs index 007a275e..fd64c93c 100644 --- a/src/LibHac/IO/RomFs/RomFsDictionary.cs +++ b/src/LibHac/IO/RomFs/RomFsDictionary.cs @@ -247,11 +247,6 @@ namespace LibHac.IO.RomFs SetCapacity(_length); } - private ref RomFsEntry GetEntryReference(int offset) - { - return ref MemoryMarshal.Cast(Entries.AsSpan(offset))[0]; - } - private ref RomFsEntry GetEntryReference(int offset, out Span name) { ref RomFsEntry entry = ref MemoryMarshal.Cast(Entries.AsSpan(offset))[0];