Remove 5 unused `Bit` methods and reduce visibility of 2
This commit is contained in:
parent
f7866ce0b7
commit
f458acbbb4
|
@ -18,43 +18,16 @@ namespace BizHawk.Common
|
|||
return new Bit((uint)rhs);
|
||||
}
|
||||
|
||||
public static implicit operator Bit(uint rhs)
|
||||
{
|
||||
Debug.Assert((rhs & ~1) is 0, "higher bits can't be used");
|
||||
return new Bit(rhs);
|
||||
}
|
||||
|
||||
public static implicit operator Bit(byte rhs)
|
||||
{
|
||||
Debug.Assert((rhs & ~1) is 0, "higher bits can't be used");
|
||||
return new Bit(rhs);
|
||||
}
|
||||
|
||||
public static implicit operator Bit(bool rhs)
|
||||
{
|
||||
return new Bit(rhs ? (byte)1 : (byte)0);
|
||||
}
|
||||
|
||||
public static implicit operator long(Bit rhs)
|
||||
{
|
||||
return rhs._val;
|
||||
}
|
||||
|
||||
public static implicit operator int(Bit rhs)
|
||||
{
|
||||
return (int)rhs._val;
|
||||
}
|
||||
|
||||
public static implicit operator uint(Bit rhs)
|
||||
{
|
||||
return rhs._val;
|
||||
}
|
||||
|
||||
public static implicit operator byte(Bit rhs)
|
||||
{
|
||||
return (byte)rhs._val;
|
||||
}
|
||||
|
||||
public static implicit operator bool(Bit rhs)
|
||||
{
|
||||
return rhs._val != 0;
|
||||
|
|
|
@ -99,12 +99,12 @@ namespace BizHawk.Common.IOExtensions
|
|||
}
|
||||
}
|
||||
|
||||
public static void WriteBit(this BinaryWriter bw, Bit bit)
|
||||
internal static void WriteBit(this BinaryWriter bw, Bit bit)
|
||||
{
|
||||
bw.Write((bool)bit);
|
||||
}
|
||||
|
||||
public static Bit ReadBit(this BinaryReader br)
|
||||
internal static Bit ReadBit(this BinaryReader br)
|
||||
{
|
||||
return br.ReadBoolean();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue