Browse Source

simplification of GetMatch method for CommandParser

pull/943/head
Chris Johnston 7 years ago
parent
commit
7fbd0ab08b
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      src/Discord.Net.Commands/CommandParser.cs

+ 2
- 7
src/Discord.Net.Commands/CommandParser.cs View File

@@ -40,13 +40,8 @@ namespace Discord.Commands
char GetMatch(IReadOnlyDictionary<char, char> dict, char ch) char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
{ {
// get the corresponding value for the key, if it exists // get the corresponding value for the key, if it exists
if (dict != null)
{
if (dict.TryGetValue(c, out var value))
{
return value;
}
}
if (dict != null && dict.TryGetValue(c, out var value))
return value;
// or get the default pair of the default double quote // or get the default pair of the default double quote
return '\"'; return '\"';
} }


Loading…
Cancel
Save