Skip to content

Commit 110b9a3

Browse files
committed
Remove redudant elses
1 parent 7737943 commit 110b9a3

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Rubberduck.RegexAssistant/Atoms/Literal.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,26 @@ public string Description
7575
{
7676
return string.Format(AssistantResources.AtomDescription_Literal_UnicodePoint, relevant.Substring(1)); //skip u
7777
}
78-
else if (relevant.StartsWith("x"))
78+
79+
if (relevant.StartsWith("x"))
7980
{
8081
return string.Format(AssistantResources.AtomDescription_Literal_HexCodepoint, relevant.Substring(1)); // skip x
8182
}
82-
else
83-
{
84-
return string.Format(AssistantResources.AtomDescription_Literal_OctalCodepoint, relevant); // no format specifier to skip
85-
}
83+
84+
return string.Format(AssistantResources.AtomDescription_Literal_OctalCodepoint, relevant); // no format specifier to skip
8685
}
87-
else if (EscapeLiterals.Contains(relevant[0]))
86+
87+
if (EscapeLiterals.Contains(relevant[0]))
8888
{
8989
return string.Format(AssistantResources.AtomDescription_Literal_EscapedLiteral, relevant);
9090
}
91-
else if (char.IsDigit(relevant[0]))
91+
92+
if (char.IsDigit(relevant[0]))
9293
{
9394
return string.Format(AssistantResources.AtomDescription_Literal_Backreference, relevant);
9495
}
95-
else
96-
{
97-
return _escapeDescriptions[relevant[0]];
98-
}
96+
97+
return _escapeDescriptions[relevant[0]];
9998
}
10099

101100
if (Specifier.Equals("."))

0 commit comments

Comments
 (0)