ReSharper: remove redundant code

This commit is contained in:
bao-qian
2016-01-06 21:34:42 +00:00
parent ae42c4df16
commit 0daa3a8f57
65 changed files with 279 additions and 250 deletions

View File

@@ -28,7 +28,7 @@ namespace Wox.Infrastructure
public MatchResult Evaluate(string str)
{
if (string.IsNullOrEmpty(str) || string.IsNullOrEmpty(query)) return new MatchResult() { Success = false };
if (string.IsNullOrEmpty(str) || string.IsNullOrEmpty(query)) return new MatchResult { Success = false };
var len = str.Length;
var compareString = opt.IgnoreCase ? str.ToLower() : str;
@@ -67,7 +67,7 @@ namespace Wox.Infrastructure
// return rendered string if we have a match for every char
if (patternIdx == pattern.Length)
{
return new MatchResult()
return new MatchResult
{
Success = true,
Value = sb.ToString(),
@@ -75,7 +75,7 @@ namespace Wox.Infrastructure
};
}
return new MatchResult() { Success = false };
return new MatchResult { Success = false };
}
private int CalScore(string str, int firstIndex, int matchLen)
@@ -107,9 +107,9 @@ namespace Wox.Infrastructure
{
public MatchOption()
{
this.Prefix = "";
this.Suffix = "";
this.IgnoreCase = true;
Prefix = "";
Suffix = "";
IgnoreCase = true;
}
/// <summary>