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; }