remove unused extension method

This commit is contained in:
adelikat 2020-06-20 14:36:57 -05:00
parent 21d2667736
commit dc656ccb23
1 changed files with 0 additions and 16 deletions

View File

@ -1,7 +1,6 @@
#nullable disable
using System;
using System.Globalization;
using System.IO;
using System.Text;
using System.Security.Cryptography;
@ -31,21 +30,6 @@ namespace BizHawk.Common.BufferExtensions
writer.WriteLine();
}
/// <exception cref="Exception"><paramref name="hex"/> has an odd number of chars</exception>
public static void ReadFromHex(this byte[] buffer, string hex)
{
if (hex.Length % 2 != 0)
{
throw new Exception("Hex value string does not appear to be properly formatted.");
}
for (int i = 0; i < buffer.Length && i * 2 < hex.Length; i++)
{
var bytehex = hex[i * 2].ToString() + hex[(i * 2) + 1];
buffer[i] = byte.Parse(bytehex, NumberStyles.HexNumber);
}
}
/// <exception cref="Exception"><paramref name="buffer"/> can't hold the same number of bytes as <paramref name="hex"/></exception>
public static unsafe void ReadFromHexFast(this byte[] buffer, string hex)
{