Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Label.cs
Go to the documentation of this file.
2
4
5public readonly struct Label : IEquatable<Label>
6{
7 internal readonly int m_label;
8
9 internal Label(int label)
10 {
11 m_label = label;
12 }
13
14 internal int GetLabelValue()
15 {
16 return m_label;
17 }
18
19 public override int GetHashCode()
20 {
21 return m_label;
22 }
23
24 public override bool Equals([NotNullWhen(true)] object? obj)
25 {
26 if (obj is Label obj2)
27 {
28 return Equals(obj2);
29 }
30 return false;
31 }
32
33 public bool Equals(Label obj)
34 {
35 return obj.m_label == m_label;
36 }
37
38 public static bool operator ==(Label a, Label b)
39 {
40 return a.Equals(b);
41 }
42
43 public static bool operator !=(Label a, Label b)
44 {
45 return !(a == b);
46 }
47}
static bool operator==(Label a, Label b)
Definition Label.cs:38
override bool Equals([NotNullWhen(true)] object? obj)
Definition Label.cs:24
readonly int m_label
Definition Label.cs:7
bool Equals(Label obj)
Definition Label.cs:33
override int GetHashCode()
Definition Label.cs:19
static bool operator!=(Label a, Label b)
Definition Label.cs:43