diff --git a/Terminal.Gui/View/Layout/PosDim.cs b/Terminal.Gui/View/Layout/PosDim.cs index 13bff4779..78e8b6668 100644 --- a/Terminal.Gui/View/Layout/PosDim.cs +++ b/Terminal.Gui/View/Layout/PosDim.cs @@ -327,7 +327,7 @@ public class Pos { } internal class PosView : Pos { - public View Target; + public readonly View Target; int side; public PosView (View view, int side) @@ -657,14 +657,7 @@ public class Dim { public override string ToString () => $"Auto({_style},{_min},{_max})"; - public override int GetHashCode () - { - int hashCode = -1242460230; - hashCode = hashCode * -1521134295 + _min.GetHashCode (); - hashCode = hashCode * -1521134295 + _max.GetHashCode (); - hashCode = hashCode * -1521134295 + _style.GetHashCode (); - return hashCode; - } + public override int GetHashCode () => HashCode.Combine (base.GetHashCode (), _min, _max, _style); public override bool Equals (object other) => other is DimAuto auto && (auto._min == _min && auto._max == _max && auto._style == _style); }