From 163b304ad1d46ce3824da7257dfbad5d1d8d7d9b Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sun, 7 Mar 2021 18:06:28 +0000 Subject: [PATCH] Do not aggressively inline methods --- .../BooleanExtensions.Conversions.Unsigned.cs | 5 ----- .../BooleanExtensions/BooleanExtensions.Conversions.cs | 8 -------- X10D/src/ComparableExtensions/ComparableExtensions.cs | 9 --------- 3 files changed, 22 deletions(-) diff --git a/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.Unsigned.cs b/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.Unsigned.cs index 3c8ac1c..4f17069 100644 --- a/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.Unsigned.cs +++ b/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.Unsigned.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.CompilerServices; namespace X10D.BooleanExtensions { @@ -30,7 +29,6 @@ namespace X10D.BooleanExtensions /// /// [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static sbyte ToSByte(this bool value) { return value ? 1 : 0; @@ -61,7 +59,6 @@ namespace X10D.BooleanExtensions /// /// [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort ToUInt16(this bool value) { return value.ToByte(); @@ -92,7 +89,6 @@ namespace X10D.BooleanExtensions /// /// [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint ToUInt32(this bool value) { return value.ToByte(); @@ -123,7 +119,6 @@ namespace X10D.BooleanExtensions /// /// [CLSCompliant(false)] - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong ToUInt64(this bool value) { return value.ToByte(); diff --git a/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.cs b/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.cs index d1cf318..e43b204 100644 --- a/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.cs +++ b/X10D/src/BooleanExtensions/BooleanExtensions.Conversions.cs @@ -1,4 +1,3 @@ -using System.Runtime.CompilerServices; namespace X10D.BooleanExtensions { @@ -28,7 +27,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte ToByte(this bool value) { return value ? 1 : 0; @@ -58,7 +56,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static decimal ToDecimal(this bool value) { return value.ToByte(); @@ -88,7 +85,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static long ToDouble(this bool value) { return value.ToByte(); @@ -118,7 +114,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static short ToInt16(this bool value) { return value.ToByte(); @@ -148,7 +143,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ToInt32(this bool value) { return value.ToByte(); @@ -178,7 +172,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static long ToInt64(this bool value) { return value.ToByte(); @@ -208,7 +201,6 @@ namespace X10D.BooleanExtensions /// // True converts to 1. /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float ToSingle(this bool value) { return value.ToByte(); diff --git a/X10D/src/ComparableExtensions/ComparableExtensions.cs b/X10D/src/ComparableExtensions/ComparableExtensions.cs index 4861484..659f8ce 100644 --- a/X10D/src/ComparableExtensions/ComparableExtensions.cs +++ b/X10D/src/ComparableExtensions/ComparableExtensions.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.CompilerServices; namespace X10D.ComparableExtensions { @@ -44,7 +43,6 @@ namespace X10D.ComparableExtensions /// // True /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Between(this T1 actual, T2 lower, T3 upper) where T1 : IComparable, IComparable { @@ -76,7 +74,6 @@ namespace X10D.ComparableExtensions /// // clamped will be 20 /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Clamp(this T value, T lower, T upper) where T : IComparable { @@ -109,7 +106,6 @@ namespace X10D.ComparableExtensions /// // result will be False /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool GreaterThan(this T1 value, T2 other) where T1 : IComparable { @@ -137,7 +133,6 @@ namespace X10D.ComparableExtensions /// // result will be False /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool GreaterThanOrEqualTo(this T1 value, T2 other) where T1 : IComparable { @@ -165,7 +160,6 @@ namespace X10D.ComparableExtensions /// // result will be True /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool LessThan(this T1 value, T2 other) where T1 : IComparable { @@ -193,7 +187,6 @@ namespace X10D.ComparableExtensions /// // result will be True /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool LessThanOrEqualTo(this T1 value, T2 other) where T1 : IComparable { @@ -220,7 +213,6 @@ namespace X10D.ComparableExtensions /// // max will be 10 /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Max(this T value, T other) where T : IComparable { @@ -247,7 +239,6 @@ namespace X10D.ComparableExtensions /// // min will be 5 /// /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Min(this T value, T other) where T : IComparable {