Small cleanup

This commit is contained in:
Alex Barney 2018-08-31 11:19:14 -05:00
parent 5a793d61d6
commit 4101c48cf4
4 changed files with 9 additions and 13 deletions

View file

@ -122,7 +122,6 @@ namespace LibHac
{
private const int TitleKeySize = 0x10;
private static readonly Dictionary<string, KeyValue> CommonKeyDict;
private static readonly Dictionary<string, KeyValue> UniqueKeyDict;
private static readonly Dictionary<string, KeyValue> AllKeyDict;
static ExternalKeys()
@ -131,7 +130,6 @@ namespace LibHac
var uniqueKeys = CreateUniqueKeyList();
CommonKeyDict = commonKeys.ToDictionary(k => k.Name, k => k);
UniqueKeyDict = uniqueKeys.ToDictionary(k => k.Name, k => k);
AllKeyDict = uniqueKeys.Concat(commonKeys).ToDictionary(k => k.Name, k => k);
}

View file

@ -115,7 +115,10 @@ namespace LibHac
SeedForPseudoDeviceId = reader.ReadUInt64();
BcatPassphrase = reader.ReadUtf8Z(65);
reader.BaseStream.Position = start + 0x3148;
reader.BaseStream.Position = start + 0x3141;
Reserved01 = reader.ReadByte();
Reserved02 = reader.ReadBytes(6);
UserAccountSaveDataSizeMax = reader.ReadInt64();
UserAccountSaveDataJournalSizeMax = reader.ReadInt64();
DeviceSaveDataSizeMax = reader.ReadInt64();

View file

@ -1,4 +1,5 @@
using System;
// ReSharper disable UnusedVariable UnusedMember.Local
using System;
using System.Collections.Generic;
using System.IO;
using LibHac;

View file

@ -130,16 +130,10 @@ namespace NandReaderGui
_handleValue = null;
base.Close();
}
private bool _disposed;
private new void Dispose()
{
Dispose(true);
base.Dispose();
GC.SuppressFinalize(this);
}
private new void Dispose(bool disposing)
protected override void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if (!_disposed)
@ -156,7 +150,7 @@ namespace NandReaderGui
}
// Note disposing has been done.
_disposed = true;
base.Dispose(disposing);
}
}
}