Skip to content

Commit

Permalink
Merge pull request #5060 from IvenBach/CorrectMinorIssues
Browse files Browse the repository at this point in the history
Correct minor issues
  • Loading branch information
rkapka committed Jul 20, 2019
2 parents b2f847a + 8d5ecc9 commit bdaf6d7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Rubberduck.Core/UI/Controls/SearchBox.xaml.cs
Expand Up @@ -54,12 +54,12 @@ public string Hint
}
}

public ICommand ClearSearchCommand => new DelegateCommand(LogManager.GetCurrentClassLogger(), (arg) => Text = "");
public ICommand ClearSearchCommand => new DelegateCommand(LogManager.GetCurrentClassLogger(), (arg) => Text = string.Empty);

public SearchBox()
{
// design instance!
Text = "";
Text = string.Empty;
Hint = "Search";
Width = 300;
Height = 25;
Expand Down
Expand Up @@ -165,7 +165,7 @@ private static TreeViewItem AsTreeViewItem(SingleAtomExpression expression)
// no other Atom has Subexpressions we care about
if (expression.Atom.GetType() == typeof(Group))
{
result.Items.Add(AsTreeViewItem((dynamic)((expression.Atom) as Group).Subexpression));
result.Items.Add(AsTreeViewItem((dynamic)(expression.Atom as Group).Subexpression));
}

return result;
Expand Down
2 changes: 0 additions & 2 deletions Rubberduck.RegexAssistant/Atoms/Group.cs
@@ -1,8 +1,6 @@
using Rubberduck.RegexAssistant.i18n;
using Rubberduck.VBEditor;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

namespace Rubberduck.RegexAssistant.Atoms
{
Expand Down
Expand Up @@ -16,7 +16,7 @@ public ConcatenatedExpression(IList<IRegularExpression> subexpressions)

public IList<IRegularExpression> Subexpressions { get; }

public override string ToString() => $"Concatenated:{Subexpressions.ToString()}";
public override string ToString() => $"Concatenated:{Subexpressions}";
public override bool Equals(object obj) => obj is ConcatenatedExpression other && Subexpressions.Equals(other.Subexpressions);
public override int GetHashCode() => HashCode.Compute(Subexpressions);
}
Expand Down
Expand Up @@ -18,7 +18,7 @@ public SingleAtomExpression(IAtom atom)
public IList<IRegularExpression> Subexpressions => new List<IRegularExpression>(Enumerable.Empty<IRegularExpression>());


public override string ToString() => $"Atom: {Atom.ToString()}";
public override string ToString() => $"Atom: {Atom}";
public override bool Equals(object obj) => obj is SingleAtomExpression other && other.Atom.Equals(Atom);
public override int GetHashCode() => Atom.GetHashCode();
}
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.RegexAssistant/QuantifierExtensions.cs
Expand Up @@ -31,7 +31,7 @@ public static string HumanReadable(this Quantifier quant)
}
return string.Format(AssistantResources.Quantifier_ClosedRange, quant.MinimumMatches, quant.MaximumMatches);
}
return "";
return string.Empty;
}
}
}
Expand Down

0 comments on commit bdaf6d7

Please sign in to comment.