From d6c5c87ae19501c33de33ad00a889a58e35fcfdd Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 20 Jan 2025 22:16:15 +1000 Subject: [PATCH] return > goto --- src/SixLabors.Fonts/TextLayout.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SixLabors.Fonts/TextLayout.cs b/src/SixLabors.Fonts/TextLayout.cs index c32930c5..24f26901 100644 --- a/src/SixLabors.Fonts/TextLayout.cs +++ b/src/SixLabors.Fonts/TextLayout.cs @@ -407,7 +407,7 @@ private static IEnumerable LayoutLineHorizontal( penLocation.Y += yLineAdvance; boxLocation.X = originX; boxLocation.Y += advanceY; - goto end; + return glyphs; } int j = 0; @@ -440,7 +440,6 @@ private static IEnumerable LayoutLineHorizontal( boxLocation.Y += advanceY; } - end: return glyphs; } @@ -552,7 +551,7 @@ private static IEnumerable LayoutLineVertical( boxLocation.Y = originY; penLocation.X += xLineAdvance; penLocation.Y = originY; - goto end; + return glyphs; } int j = 0; @@ -599,7 +598,6 @@ private static IEnumerable LayoutLineVertical( penLocation.X += xLineAdvance; } - end: return glyphs; } @@ -711,7 +709,7 @@ private static IEnumerable LayoutLineVerticalMixed( boxLocation.Y = originY; penLocation.X += xLineAdvance; penLocation.Y = originY; - goto end; + return glyphs; } if (data.IsTransformed) @@ -787,7 +785,6 @@ private static IEnumerable LayoutLineVerticalMixed( penLocation.X += xLineAdvance; } - end: return glyphs; }