@@ -65,7 +65,6 @@ public static class Util
65
65
private static readonly Type GenericSpanType = typeof ( Span < > ) ;
66
66
private static string ? scmVersionInternal ;
67
67
private static string ? gitHashInternal ;
68
- private static int ? gitCommitCountInternal ;
69
68
private static string ? gitHashClientStructsInternal ;
70
69
71
70
private static ulong moduleStartAddr ;
@@ -77,58 +76,6 @@ public static class Util
77
76
public static string AssemblyVersion { get ; } =
78
77
Assembly . GetAssembly ( typeof ( ChatHandlers ) ) . GetName ( ) . Version . ToString ( ) ;
79
78
80
- /// <summary>
81
- /// Check two byte arrays for equality.
82
- /// </summary>
83
- /// <param name="a1">The first byte array.</param>
84
- /// <param name="a2">The second byte array.</param>
85
- /// <returns>Whether or not the byte arrays are equal.</returns>
86
- public static unsafe bool FastByteArrayCompare ( byte [ ] ? a1 , byte [ ] ? a2 )
87
- {
88
- // Copyright (c) 2008-2013 Hafthor Stefansson
89
- // Distributed under the MIT/X11 software license
90
- // Ref: http://www.opensource.org/licenses/mit-license.php.
91
- // https://stackoverflow.com/a/8808245
92
-
93
- if ( a1 == a2 ) return true ;
94
- if ( a1 == null || a2 == null || a1 . Length != a2 . Length )
95
- return false ;
96
- fixed ( byte * p1 = a1 , p2 = a2 )
97
- {
98
- byte * x1 = p1 , x2 = p2 ;
99
- var l = a1 . Length ;
100
- for ( var i = 0 ; i < l / 8 ; i ++ , x1 += 8 , x2 += 8 )
101
- {
102
- if ( * ( ( long * ) x1 ) != * ( ( long * ) x2 ) )
103
- return false;
104
- }
105
-
106
- if ( ( l & 4 ) != 0 )
107
- {
108
- if ( * ( ( int * ) x1 ) != * ( ( int * ) x2 ) )
109
- return false;
110
- x1 += 4 ;
111
- x2 += 4 ;
112
- }
113
-
114
- if ( ( l & 2 ) != 0 )
115
- {
116
- if ( * ( ( short * ) x1 ) != * ( ( short * ) x2 ) )
117
- return false;
118
- x1 += 2 ;
119
- x2 += 2 ;
120
- }
121
-
122
- if ( ( l & 1 ) != 0 )
123
- {
124
- if ( * ( ( byte * ) x1 ) != * ( ( byte * ) x2 ) )
125
- return false;
126
- }
127
-
128
- return true;
129
- }
130
- }
131
-
132
79
/// <summary>
133
80
/// Gets the SCM Version from the assembly, or null if it cannot be found. This method will generally return
134
81
/// the <c>git describe</c> output for this build, which will be a raw version if this is a stable build or an
0 commit comments