From 2d2a770a7cbef8635786dd2ca4b72fabee7104d5 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 8 Mar 2015 02:31:58 +0000 Subject: [PATCH] don't need these files --- .../BizHawk.Emulation.Cores.csproj | 3 -- .../Virtu/Library/IEnumerableExtensions.cs | 25 --------- .../AppleII/Virtu/Library/MarshalHelpers.cs | 35 ------------ .../Virtu/Library/StringBuilderExtensions.cs | 54 ------------------- 4 files changed, 117 deletions(-) delete mode 100644 BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/IEnumerableExtensions.cs delete mode 100644 BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/MarshalHelpers.cs delete mode 100644 BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/StringBuilderExtensions.cs diff --git a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj index 6738488470..5ad315464c 100644 --- a/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj +++ b/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj @@ -127,11 +127,8 @@ - - - diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/IEnumerableExtensions.cs b/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/IEnumerableExtensions.cs deleted file mode 100644 index 2b1bb460e5..0000000000 --- a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/IEnumerableExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Jellyfish.Library -{ - public static class IEnumerableExtensions - { - public static void ForEach(this IEnumerable source, Action action) - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - if (action == null) - { - throw new ArgumentNullException("action"); - } - - foreach (T item in source) - { - action(item); - } - } - } -} diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/MarshalHelpers.cs b/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/MarshalHelpers.cs deleted file mode 100644 index eba53940a8..0000000000 --- a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/MarshalHelpers.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; -using System.Security; - -namespace Jellyfish.Library -{ - public static class MarshalHelpers - { - [SecurityCritical] - public static void FillMemory(IntPtr buffer, int bufferSize, byte value) - { - NativeMethods.FillMemory(buffer, (IntPtr)bufferSize, value); - } - - [SecurityCritical] - public static void ZeroMemory(IntPtr buffer, int bufferSize) - { - NativeMethods.ZeroMemory(buffer, (IntPtr)bufferSize); - } - - [SecurityCritical] - [SuppressUnmanagedCodeSecurity] - private static class NativeMethods - { - [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] - [DllImport("kernel32.dll", SetLastError = true)] - public static extern void FillMemory(IntPtr destination, IntPtr length, byte fill); - - [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] - [DllImport("kernel32.dll", SetLastError = true)] - public static extern void ZeroMemory(IntPtr destination, IntPtr length); - } - } -} diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/StringBuilderExtensions.cs b/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/StringBuilderExtensions.cs deleted file mode 100644 index 5935c605f5..0000000000 --- a/BizHawk.Emulation.Cores/Computers/AppleII/Virtu/Library/StringBuilderExtensions.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Globalization; -using System.Text; - -namespace Jellyfish.Library -{ - public static class StringBuilderExtensions - { - public static StringBuilder AppendHex(this StringBuilder builder, short value) // little endian - { - if (builder == null) - { - throw new ArgumentNullException("builder"); - } - - return builder.AppendFormat(CultureInfo.InvariantCulture, "{0:X2}{1:X2}", value & 0xFF, value >> 8); - } - - public static StringBuilder AppendHex(this StringBuilder builder, int value) // little endian - { - if (builder == null) - { - throw new ArgumentNullException("builder"); - } - - return builder.AppendFormat(CultureInfo.InvariantCulture, "{0:X2}{1:X2}{2:X2}{3:X2}", value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, value >> 24); - } - - public static StringBuilder AppendWithoutGarbage(this StringBuilder builder, int value) - { - if (builder == null) - { - throw new ArgumentNullException("builder"); - } - - if (value < 0) - { - builder.Append('-'); - } - - int index = builder.Length; - do - { - builder.Insert(index, Digits, (value % 10) + 9, 1); - value /= 10; - } - while (value != 0); - - return builder; - } - - private static readonly char[] Digits = new char[] { '9', '8', '7', '6', '5', '4', '3', '2', '1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; - } -}