slight reorg in extension file

This commit is contained in:
adelikat 2014-07-03 15:39:40 +00:00
parent f546a8080c
commit 07876e0f12
1 changed files with 19 additions and 15 deletions

View File

@ -311,21 +311,6 @@ namespace BizHawk.Common
}
}
private static int Hex2Int(char c)
{
if (c <= '9')
{
return c - '0';
}
if (c <= 'F')
{
return c - '7';
}
return c - 'W';
}
public static unsafe void ReadFromHexFast(this byte[] buffer, string hex)
{
if (buffer.Length * 2 != hex.Length)
@ -382,6 +367,25 @@ namespace BizHawk.Common
}
}
#region Helpers
private static int Hex2Int(char c)
{
if (c <= '9')
{
return c - '0';
}
if (c <= 'F')
{
return c - '7';
}
return c - 'W';
}
#endregion
//these don't work??? they dont get chosen by compiler
public static void WriteBit(this BinaryWriter bw, Bit bit) { bw.Write((bool)bit); }
public static Bit ReadBit(this BinaryReader br) { return br.ReadBoolean(); }