diff --git a/src/BizHawk.Common/Bit.cs b/src/BizHawk.Common/Bit.cs index fa7188ca53..7b911596c3 100644 --- a/src/BizHawk.Common/Bit.cs +++ b/src/BizHawk.Common/Bit.cs @@ -3,15 +3,8 @@ using System.Diagnostics; namespace BizHawk.Common { // I think this is a little faster with uint than with byte - public readonly struct Bit + public readonly record struct Bit(uint _val) { - private readonly uint _val; - - public Bit(uint val) - { - _val = val; - } - public static implicit operator Bit(int rhs) { Debug.Assert((rhs & ~1) is 0, "higher bits can't be used"); @@ -37,25 +30,5 @@ namespace BizHawk.Common { return _val.ToString(); } - - public static bool operator ==(Bit lhs, Bit rhs) - { - return lhs._val == rhs._val; - } - - public static bool operator !=(Bit lhs, Bit rhs) - { - return lhs._val != rhs._val; - } - - public override int GetHashCode() - { - return _val.GetHashCode(); - } - - public override bool Equals(object? obj) - { - return obj is Bit b && this == b; - } } }