Minor tweaks

no functional change
This commit is contained in:
Kurt 2021-01-28 07:07:41 -08:00
parent ef6e0f0987
commit f316ffce9e
3 changed files with 6 additions and 13 deletions

View File

@ -1,6 +1,6 @@
namespace NHSE.Core
{
public readonly struct CryptoFile
internal readonly ref struct CryptoFile
{
public readonly byte[] Data;
public readonly byte[] Key;
@ -12,12 +12,5 @@ public CryptoFile(byte[] data, byte[] key, byte[] ctr)
Key = key;
Ctr = ctr;
}
#region Equality Comparison
public override bool Equals(object obj) => obj is CryptoFile r && r == this;
public override int GetHashCode() => Data.GetHashCode();
public static bool operator !=(CryptoFile left, CryptoFile right) => !(left == right);
public static bool operator ==(CryptoFile left, CryptoFile right) => left.Data == right.Data;
#endregion
}
}

View File

@ -1,6 +1,6 @@
namespace NHSE.Core
{
public readonly struct EncryptedSaveFile
public readonly ref struct EncryptedSaveFile
{
public readonly byte[] Data;
public readonly byte[] Header;
@ -12,10 +12,10 @@ public EncryptedSaveFile(byte[] data, byte[] header)
}
#region Equality Comparison
public override bool Equals(object obj) => obj is EncryptedSaveFile r && r == this;
public override bool Equals(object obj) => false;
public override int GetHashCode() => Data.GetHashCode();
public static bool operator !=(EncryptedSaveFile left, EncryptedSaveFile right) => !(left == right);
public static bool operator ==(EncryptedSaveFile left, EncryptedSaveFile right) => left.Data == right.Data && left.Header == right.Header;
#endregion
}
}
}

View File

@ -77,12 +77,12 @@ public enum Reaction : byte
Tada, // AddPraise
WaveGoodbye, // AddWaveHands
Excited, // AddExcited
Confetti, // (Festivale DLC)
Viva, // (Festivale DLC)
LetsGo, // (Festivale DLC)
FeelinIt, // (Festivale DLC)
UNUSED_75, // Gullivar about to come alive (Unused)
UNUSED_76, // Intense shake action (Unused)
UNUSED_77, // Literally the "roll safe" meme (google it) (Unused)