diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Aabb.cs index d25944dcebb..cc99225a335 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 d53dd9a9af7..a7712db7379 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 5dddb38055f..293e680067f 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 3c7455a76c5..85b2b02c450 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 998a2786a76..a80d202ef27 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 2e282447bd5..39e1b7e4b8f 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 458802f95d2..babb26960b8 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 2099d0abca9..49fba02b54f 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 618c892681c..0e3e54a0c28 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 b16e6e592ec..7b27071df12 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 642ef231f3f..4842dbc9afc 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 b5ff744c552..4ee452455e0 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 7d548f1d104..0b203c5148a 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 62aa02e5123..db8ceb30e9d 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 10a0b141624..eeaef5e46e6 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 56c1df4c64d..e75e996b04d 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); } ///