From dc656ccb238d995078d0d6cd5f39e07ed2919396 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 20 Jun 2020 14:36:57 -0500 Subject: [PATCH] remove unused extension method --- .../Extensions/BufferExtensions.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/BizHawk.Common/Extensions/BufferExtensions.cs b/src/BizHawk.Common/Extensions/BufferExtensions.cs index 26c59877ee..33131a899c 100644 --- a/src/BizHawk.Common/Extensions/BufferExtensions.cs +++ b/src/BizHawk.Common/Extensions/BufferExtensions.cs @@ -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(); } - /// has an odd number of chars - 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); - } - } - /// can't hold the same number of bytes as public static unsafe void ReadFromHexFast(this byte[] buffer, string hex) {