diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs index d25944dcebb3..cc99225a3356 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs @@ -723,7 +723,7 @@ namespace Godot /// A hash code for this AABB. public override readonly int GetHashCode() { - return _position.GetHashCode() ^ _size.GetHashCode(); + return HashCode.Combine(_position, _size); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs index d53dd9a9af76..a7712db73795 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs @@ -1123,7 +1123,7 @@ namespace Godot /// A hash code for this basis. public override readonly int GetHashCode() { - return Row0.GetHashCode() ^ Row1.GetHashCode() ^ Row2.GetHashCode(); + return HashCode.Combine(Row0, Row1, Row2); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs index 5dddb38055f9..293e680067f2 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs @@ -1308,7 +1308,7 @@ namespace Godot /// A hash code for this color. public override readonly int GetHashCode() { - return R.GetHashCode() ^ G.GetHashCode() ^ B.GetHashCode() ^ A.GetHashCode(); + return HashCode.Combine(R, G, B, A); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs index 3c7455a76c50..85b2b02c450e 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs @@ -414,7 +414,7 @@ namespace Godot /// A hash code for this plane. public override readonly int GetHashCode() { - return _normal.GetHashCode() ^ _d.GetHashCode(); + return HashCode.Combine(_normal, _d); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs index 998a2786a76f..a80d202ef27d 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs @@ -1001,7 +1001,7 @@ namespace Godot /// A hash code for this projection. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); + return HashCode.Combine(X, Y, Z, W); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs index 2e282447bd5c..39e1b7e4b8f5 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs @@ -800,7 +800,7 @@ namespace Godot /// A hash code for this quaternion. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); + return HashCode.Combine(X, Y, Z, W); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs index 458802f95d2f..babb26960b80 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs @@ -459,7 +459,7 @@ namespace Godot /// A hash code for this rect. public override readonly int GetHashCode() { - return _position.GetHashCode() ^ _size.GetHashCode(); + return HashCode.Combine(_position, _size); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs index 2099d0abca9c..49fba02b54fd 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs @@ -419,7 +419,7 @@ namespace Godot /// A hash code for this rect. public override readonly int GetHashCode() { - return _position.GetHashCode() ^ _size.GetHashCode(); + return HashCode.Combine(_position, _size); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs index 618c892681cd..0e3e54a0c28b 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs @@ -626,7 +626,7 @@ namespace Godot /// A hash code for this transform. public override readonly int GetHashCode() { - return X.GetHashCode() ^ Y.GetHashCode() ^ Origin.GetHashCode(); + return HashCode.Combine(X, Y, Origin); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs index b16e6e592ecd..7b27071df122 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs @@ -653,7 +653,7 @@ namespace Godot /// A hash code for this transform. public override readonly int GetHashCode() { - return Basis.GetHashCode() ^ Origin.GetHashCode(); + return HashCode.Combine(Basis, Origin); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs index 642ef231f3f4..4842dbc9afc8 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs @@ -1000,7 +1000,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode(); + return HashCode.Combine(X, Y); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs index b5ff744c5521..4ee452455e03 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2I.cs @@ -556,7 +556,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode(); + return HashCode.Combine(X, Y); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs index 7d548f1d104a..0b203c5148aa 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs @@ -1102,7 +1102,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode(); + return HashCode.Combine(X, Y, Z); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs index 62aa02e5123a..db8ceb30e9d0 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3I.cs @@ -611,7 +611,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode(); + return HashCode.Combine(X, Y, Z); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs index 10a0b1416248..eeaef5e46e61 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs @@ -884,7 +884,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); + return HashCode.Combine(X, Y, Z, W); } /// diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs index 56c1df4c64dd..e75e996b04dd 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4I.cs @@ -632,7 +632,7 @@ namespace Godot /// A hash code for this vector. public override readonly int GetHashCode() { - return Y.GetHashCode() ^ X.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); + return HashCode.Combine(X, Y, Z, W); } ///