From d52d14e848a88e1eac6b1472f502b46dc9fac1fd Mon Sep 17 00:00:00 2001 From: BlazeFace Date: Sat, 13 Apr 2024 17:23:26 -0700 Subject: [PATCH] Undo debug change and add method group --- src/Spectre.Console/Internal/Ratio.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Spectre.Console/Internal/Ratio.cs b/src/Spectre.Console/Internal/Ratio.cs index 80059fc..69f752c 100644 --- a/src/Spectre.Console/Internal/Ratio.cs +++ b/src/Spectre.Console/Internal/Ratio.cs @@ -32,7 +32,7 @@ internal static class Ratio return edge.Size; } - var sizes = edges.Select(x => GetEdgeWidth(x)).ToArray(); + var sizes = edges.Select(GetEdgeWidth).ToArray(); while (sizes.Any(s => s == null)) { @@ -56,8 +56,7 @@ internal static class Ratio .ToList(); } - var r = flexibleEdges.Sum(x => Math.Max(1, x.Edge.Ratio)); - var portion = (float)remaining / r; + var portion = (float)remaining / flexibleEdges.Sum(x => Math.Max(1, x.Edge.Ratio)); var invalidate = false; foreach (var (index, size, edge) in flexibleEdges)