Added FisheryLib.Collections.FishTable and Mono.Cecil extension methods

A bit of refactoring has been done too
This commit is contained in:
bbradson
2023-06-03 20:10:58 +02:00
parent 8fa92f15a6
commit cdf209eb02
72 changed files with 8145 additions and 2098 deletions
+4 -3
View File
@@ -12,16 +12,17 @@ namespace FisheryLib;
public static class Equality
{
/// <summary>
/// Generic overload of Equals to avoid boxing. Makes use of function pointers for best performance and does not throw on null for reference types.
/// Generic overload of Equals to avoid boxing. Makes use of function pointers for best performance and does not
/// throw on null for reference types.
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe bool Equals<T>([AllowNull] this T @this, [AllowNull] T other)
=> FunctionPointers.Equals<T>.Default(@this!, other!);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe bool Equals<T>([AllowNull] this ref T @this, [AllowNull] ref T other)
public static unsafe bool Equals<T>(this ref T @this, ref T other)
where T : struct // required by the compiler for 'this ref'
=> FunctionPointers.EqualsByRef<T>.Default(ref @this!, ref other!);
=> FunctionPointers.EqualsByRef<T>.Default(ref @this, ref other);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe bool EqualsByRef<T>([AllowNull] ref T @this, [AllowNull] ref T other)