Remove leftover code

This commit is contained in:
Alex Barney 2019-02-03 18:56:38 -06:00
parent cdc3800e8d
commit e111805702
3 changed files with 4 additions and 19 deletions

View file

@ -7,24 +7,14 @@ namespace LibHac.IO.RomFs
{ {
public class HierarchicalRomFileTable public class HierarchicalRomFileTable
{ {
private IStorage DirHashTableStorage { get; }
private IStorage DirEntryTableStorage { get; }
private IStorage FileHashTableStorage { get; }
private IStorage FileEntryTableStorage { get; }
private RomFsDictionary<FileRomEntry> FileTable { get; } private RomFsDictionary<FileRomEntry> FileTable { get; }
private RomFsDictionary<DirectoryRomEntry> DirectoryTable { get; } private RomFsDictionary<DirectoryRomEntry> DirectoryTable { get; }
public HierarchicalRomFileTable(IStorage dirHashTable, IStorage dirEntryTable, IStorage fileHashTable, public HierarchicalRomFileTable(IStorage dirHashTable, IStorage dirEntryTable, IStorage fileHashTable,
IStorage fileEntryTable) IStorage fileEntryTable)
{ {
DirHashTableStorage = dirHashTable; FileTable = new RomFsDictionary<FileRomEntry>(fileHashTable, fileEntryTable);
DirEntryTableStorage = dirEntryTable; DirectoryTable = new RomFsDictionary<DirectoryRomEntry>(dirHashTable, dirEntryTable);
FileHashTableStorage = fileHashTable;
FileEntryTableStorage = fileEntryTable;
FileTable = new RomFsDictionary<FileRomEntry>(FileHashTableStorage, FileEntryTableStorage);
DirectoryTable = new RomFsDictionary<DirectoryRomEntry>(DirHashTableStorage, DirEntryTableStorage);
} }
public HierarchicalRomFileTable() : this(0, 0) { } public HierarchicalRomFileTable() : this(0, 0) { }

View file

@ -11,8 +11,8 @@ namespace LibHac.IO.RomFs
private const int HeaderSize = 0x50; private const int HeaderSize = 0x50;
private const int HeaderWithPaddingSize = 0x200; private const int HeaderWithPaddingSize = 0x200;
public List<IStorage> Sources { get; } = new List<IStorage>(); private List<IStorage> Sources { get; } = new List<IStorage>();
public HierarchicalRomFileTable FileTable { get; } = new HierarchicalRomFileTable(); private HierarchicalRomFileTable FileTable { get; } = new HierarchicalRomFileTable();
private long CurrentOffset { get; set; } private long CurrentOffset { get; set; }
public RomFsBuilder() { } public RomFsBuilder() { }

View file

@ -247,11 +247,6 @@ namespace LibHac.IO.RomFs
SetCapacity(_length); SetCapacity(_length);
} }
private ref RomFsEntry GetEntryReference(int offset)
{
return ref MemoryMarshal.Cast<byte, RomFsEntry>(Entries.AsSpan(offset))[0];
}
private ref RomFsEntry GetEntryReference(int offset, out Span<byte> name) private ref RomFsEntry GetEntryReference(int offset, out Span<byte> name)
{ {
ref RomFsEntry entry = ref MemoryMarshal.Cast<byte, RomFsEntry>(Entries.AsSpan(offset))[0]; ref RomFsEntry entry = ref MemoryMarshal.Cast<byte, RomFsEntry>(Entries.AsSpan(offset))[0];