@@ -8,13 +8,13 @@ namespace Flow.Launcher.Infrastructure
8
8
{
9
9
public class StringMatcher
10
10
{
11
- private readonly MatchOption _defaultMatchOption = new MatchOption ( ) ;
11
+ private readonly MatchOption _defaultMatchOption = new ( ) ;
12
12
13
13
public SearchPrecisionScore UserSettingSearchPrecision { get ; set ; }
14
14
15
15
private readonly IAlphabet _alphabet ;
16
16
17
- public StringMatcher ( IAlphabet alphabet = null )
17
+ public StringMatcher ( )
18
18
{
19
19
_alphabet = Ioc . Default . GetRequiredService < IAlphabet > ( ) ;
20
20
}
@@ -242,16 +242,16 @@ private bool IsAcronymCount(string stringToCompare, int compareStringIndex)
242
242
return false ;
243
243
}
244
244
245
- private bool IsAcronymChar ( string stringToCompare , int compareStringIndex )
245
+ private static bool IsAcronymChar ( string stringToCompare , int compareStringIndex )
246
246
=> char . IsUpper ( stringToCompare [ compareStringIndex ] ) ||
247
247
compareStringIndex == 0 || // 0 index means char is the start of the compare string, which is an acronym
248
248
char . IsWhiteSpace ( stringToCompare [ compareStringIndex - 1 ] ) ;
249
249
250
- private bool IsAcronymNumber ( string stringToCompare , int compareStringIndex )
250
+ private static bool IsAcronymNumber ( string stringToCompare , int compareStringIndex )
251
251
=> stringToCompare [ compareStringIndex ] >= 0 && stringToCompare [ compareStringIndex ] <= 9 ;
252
252
253
253
// To get the index of the closest space which preceeds the first matching index
254
- private int CalculateClosestSpaceIndex ( List < int > spaceIndices , int firstMatchIndex )
254
+ private static int CalculateClosestSpaceIndex ( List < int > spaceIndices , int firstMatchIndex )
255
255
{
256
256
var closestSpaceIndex = - 1 ;
257
257
0 commit comments