mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
ReSharper: remove redundant code
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user