Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SetOfValueComparer.cs
Go to the documentation of this file.
2
3namespace System.Formats.Asn1;
4
5internal sealed class SetOfValueComparer : IComparer<ReadOnlyMemory<byte>>
6{
7 internal static SetOfValueComparer Instance { get; } = new SetOfValueComparer();
8
9
11 {
12 return Compare(x.Span, y.Span);
13 }
14
16 {
17 int num = Math.Min(x.Length, y.Length);
18 for (int i = 0; i < num; i++)
19 {
20 int num2 = x[i];
21 byte b = y[i];
22 int num3 = num2 - b;
23 if (num3 != 0)
24 {
25 return num3;
26 }
27 }
28 return x.Length - y.Length;
29 }
30}
int Compare(ReadOnlyMemory< byte > x, ReadOnlyMemory< byte > y)
static int Compare(ReadOnlySpan< byte > x, ReadOnlySpan< byte > y)
static byte Min(byte val1, byte val2)
Definition Math.cs:912