Skip to content

Commit

Permalink
ToString() is to force throw if View is null. Good catch.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDisp committed Feb 27, 2023
1 parent 47ca62d commit 19dbb41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Terminal.Gui/Core/PosDim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ internal override int Anchor (int width)

public override string ToString ()
{
return $"PosCombine({left}{(add ? '+' : '-')}{right})";
return $"PosCombine({left.ToString ()}{(add ? '+' : '-')}{right.ToString ()})";
}

}
Expand Down Expand Up @@ -345,7 +345,7 @@ public override string ToString ()
case 3: tside = "bottom"; break;
default: tside = "unknown"; break;
}
return $"PosView({tside},{Target})";
return $"PosView({tside},{Target.ToString()})";
}

public override int GetHashCode () => Target.GetHashCode ();
Expand Down Expand Up @@ -613,7 +613,7 @@ internal override int Anchor (int width)

public override string ToString ()
{
return $"DimCombine({left}{(add ? '+' : '-')}{right})";
return $"DimCombine({left}{(add ? '+' : '-')}{right.ToString ()})";
}

}
Expand Down Expand Up @@ -691,7 +691,7 @@ public override string ToString ()
case 1: tside = "Width"; break;
default: tside = "unknown"; break;
}
return $"DimView({tside},{Target})";
return $"DimView({tside},{Target.ToString ()})";
}

public override int GetHashCode () => Target.GetHashCode ();
Expand Down

0 comments on commit 19dbb41

Please sign in to comment.