Skip to content

Commit d6c5c87

Browse files
return > goto
1 parent 9241396 commit d6c5c87

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/SixLabors.Fonts/TextLayout.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ private static IEnumerable<GlyphLayout> LayoutLineHorizontal(
407407
penLocation.Y += yLineAdvance;
408408
boxLocation.X = originX;
409409
boxLocation.Y += advanceY;
410-
goto end;
410+
return glyphs;
411411
}
412412

413413
int j = 0;
@@ -440,7 +440,6 @@ private static IEnumerable<GlyphLayout> LayoutLineHorizontal(
440440
boxLocation.Y += advanceY;
441441
}
442442

443-
end:
444443
return glyphs;
445444
}
446445

@@ -552,7 +551,7 @@ private static IEnumerable<GlyphLayout> LayoutLineVertical(
552551
boxLocation.Y = originY;
553552
penLocation.X += xLineAdvance;
554553
penLocation.Y = originY;
555-
goto end;
554+
return glyphs;
556555
}
557556

558557
int j = 0;
@@ -599,7 +598,6 @@ private static IEnumerable<GlyphLayout> LayoutLineVertical(
599598
penLocation.X += xLineAdvance;
600599
}
601600

602-
end:
603601
return glyphs;
604602
}
605603

@@ -711,7 +709,7 @@ private static IEnumerable<GlyphLayout> LayoutLineVerticalMixed(
711709
boxLocation.Y = originY;
712710
penLocation.X += xLineAdvance;
713711
penLocation.Y = originY;
714-
goto end;
712+
return glyphs;
715713
}
716714

717715
if (data.IsTransformed)
@@ -787,7 +785,6 @@ private static IEnumerable<GlyphLayout> LayoutLineVerticalMixed(
787785
penLocation.X += xLineAdvance;
788786
}
789787

790-
end:
791788
return glyphs;
792789
}
793790

0 commit comments

Comments
 (0)