Skip to content

Commit bdaf6d7

Browse files
authored
Merge pull request #5060 from IvenBach/CorrectMinorIssues
Correct minor issues
2 parents b2f847a + 8d5ecc9 commit bdaf6d7

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

Rubberduck.Core/UI/Controls/SearchBox.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public string Hint
5454
}
5555
}
5656

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

5959
public SearchBox()
6060
{
6161
// design instance!
62-
Text = "";
62+
Text = string.Empty;
6363
Hint = "Search";
6464
Width = 300;
6565
Height = 25;

Rubberduck.Core/UI/RegexAssistant/RegexAssistantViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private static TreeViewItem AsTreeViewItem(SingleAtomExpression expression)
165165
// no other Atom has Subexpressions we care about
166166
if (expression.Atom.GetType() == typeof(Group))
167167
{
168-
result.Items.Add(AsTreeViewItem((dynamic)((expression.Atom) as Group).Subexpression));
168+
result.Items.Add(AsTreeViewItem((dynamic)(expression.Atom as Group).Subexpression));
169169
}
170170

171171
return result;

Rubberduck.RegexAssistant/Atoms/Group.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using Rubberduck.RegexAssistant.i18n;
22
using Rubberduck.VBEditor;
33
using System;
4-
using System.Collections.Generic;
5-
using System.Text.RegularExpressions;
64

75
namespace Rubberduck.RegexAssistant.Atoms
86
{

Rubberduck.RegexAssistant/Expressions/ConcatenatedExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ConcatenatedExpression(IList<IRegularExpression> subexpressions)
1616

1717
public IList<IRegularExpression> Subexpressions { get; }
1818

19-
public override string ToString() => $"Concatenated:{Subexpressions.ToString()}";
19+
public override string ToString() => $"Concatenated:{Subexpressions}";
2020
public override bool Equals(object obj) => obj is ConcatenatedExpression other && Subexpressions.Equals(other.Subexpressions);
2121
public override int GetHashCode() => HashCode.Compute(Subexpressions);
2222
}

Rubberduck.RegexAssistant/Expressions/SingleAtomExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public SingleAtomExpression(IAtom atom)
1818
public IList<IRegularExpression> Subexpressions => new List<IRegularExpression>(Enumerable.Empty<IRegularExpression>());
1919

2020

21-
public override string ToString() => $"Atom: {Atom.ToString()}";
21+
public override string ToString() => $"Atom: {Atom}";
2222
public override bool Equals(object obj) => obj is SingleAtomExpression other && other.Atom.Equals(Atom);
2323
public override int GetHashCode() => Atom.GetHashCode();
2424
}

Rubberduck.RegexAssistant/QuantifierExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static string HumanReadable(this Quantifier quant)
3131
}
3232
return string.Format(AssistantResources.Quantifier_ClosedRange, quant.MinimumMatches, quant.MaximumMatches);
3333
}
34-
return "";
34+
return string.Empty;
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)