mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Remove unnecessary constructor
Make key readonly
This commit is contained in:
parent
95f24a9d36
commit
7e6edbaded
|
|
@ -151,7 +151,7 @@ public sealed class SCBlock : BlockInfo
|
|||
/// <summary>
|
||||
/// Used to encrypt the rest of the block.
|
||||
/// </summary>
|
||||
public uint Key { get; set; }
|
||||
public readonly uint Key;
|
||||
|
||||
/// <summary>
|
||||
/// What kind of block is it?
|
||||
|
|
@ -168,8 +168,7 @@ public sealed class SCBlock : BlockInfo
|
|||
/// </summary>
|
||||
public byte[] Data = Array.Empty<byte>();
|
||||
|
||||
private SCBlock(uint key) => Key = key;
|
||||
internal SCBlock() { }
|
||||
internal SCBlock(uint key) => Key = key;
|
||||
protected override bool ChecksumValid(byte[] data) => true;
|
||||
protected override void SetChecksum(byte[] data) { }
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ private static SCBlock[] GetBlankBlockArray(IReadOnlyList<uint> arr)
|
|||
for (int i = 0; i < blocks.Length; i++)
|
||||
{
|
||||
int index = i * 2;
|
||||
blocks[i] = new SCBlock { Key = arr[index], Data = new byte[(int)arr[index + 1]] };
|
||||
blocks[i] = new SCBlock(arr[index]) { Data = new byte[(int)arr[index + 1]] };
|
||||
}
|
||||
|
||||
return blocks;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user