Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
LocalDefinition.cs
Go to the documentation of this file.
2
4
5internal readonly struct LocalDefinition
6{
7 public int Index { get; }
8
10
11 internal LocalDefinition(int localIndex, ParameterExpression parameter)
12 {
13 Index = localIndex;
14 Parameter = parameter;
15 }
16
17 public override bool Equals([NotNullWhen(true)] object obj)
18 {
19 if (obj is LocalDefinition localDefinition)
20 {
21 if (localDefinition.Index == Index)
22 {
23 return localDefinition.Parameter == Parameter;
24 }
25 return false;
26 }
27 return false;
28 }
29
30 public override int GetHashCode()
31 {
32 if (Parameter == null)
33 {
34 return 0;
35 }
36 return Parameter.GetHashCode() ^ Index.GetHashCode();
37 }
38}
override int GetHashCode()
Definition Index.cs:95
LocalDefinition(int localIndex, ParameterExpression parameter)
override bool Equals([NotNullWhen(true)] object obj)