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 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
}
}
}