Skip to content

Commit b833f03

Browse files
pchotereaperrr
authored andcommitted
Remove redundant check from LabelWithHighlightWidget.
1 parent ad75e2b commit b833f03

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

OpenRA.Mods.Common/Widgets/LabelWithHighlightWidget.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@ protected LabelWithHighlightWidget(LabelWithHighlightWidget other)
5050

5151
if (highlightStart > 0 && highlightEnd > highlightStart)
5252
{
53-
if (highlightStart > 0)
54-
{
55-
// Normal line segment before highlight
56-
var lineNormal = line.Substring(0, highlightStart);
57-
components.Add((lineNormal, false));
58-
}
53+
// Normal line segment before highlight
54+
var lineNormal = line.Substring(0, highlightStart);
55+
components.Add((lineNormal, false));
5956

6057
// Highlight line segment
6158
var lineHighlight = line.Substring(highlightStart + 1, highlightEnd - highlightStart - 1);

0 commit comments

Comments
 (0)