Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use (string == ) instead of (string.Length == 0) #1969

Merged
merged 1 commit into from
Jul 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions WalletWasabi/Mono/Option.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected Option(string prototype, string description, int maxValueCount, bool h
throw new ArgumentNullException(nameof(prototype));
}

if (prototype.Length == 0)
if (prototype == "")
{
throw new ArgumentException("Cannot be an empty string.", nameof(prototype));
}
Expand Down Expand Up @@ -296,7 +296,7 @@ private OptionValueType ParsePrototype()
for (int i = 0; i < Names.Length; ++i)
{
string name = Names[i];
if (name.Length == 0)
if (name == "")
{
throw new ArgumentException("Empty option names are not supported.", nameof(Prototype));
}
Expand Down Expand Up @@ -342,7 +342,7 @@ private OptionValueType ParsePrototype()
{
ValueSeparators = new string[] { ":", "=" };
}
else if (seps.Count == 1 && seps[0].Length == 0)
else if (seps.Count == 1 && seps[0] == "")
{
ValueSeparators = null;
}
Expand Down