From 81733d35a62510573c533f00da5d9b7e33fdb7e1 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 28 Jan 2021 14:05:09 +1100 Subject: [PATCH] fix formatting --- Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 1 - Flow.Launcher.Infrastructure/StringMatcher.cs | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs index be3c58f66..f1557c45a 100644 --- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs +++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Text; using JetBrains.Annotations; using Flow.Launcher.Infrastructure.UserSettings; -using Microsoft.AspNetCore.Localization; using ToolGood.Words.Pinyin; namespace Flow.Launcher.Infrastructure diff --git a/Flow.Launcher.Infrastructure/StringMatcher.cs b/Flow.Launcher.Infrastructure/StringMatcher.cs index 3777c6811..63722bd54 100644 --- a/Flow.Launcher.Infrastructure/StringMatcher.cs +++ b/Flow.Launcher.Infrastructure/StringMatcher.cs @@ -59,7 +59,6 @@ namespace Flow.Launcher.Infrastructure var fullStringToCompareWithoutCase = opt.IgnoreCase ? stringToCompare.ToLower() : stringToCompare; - var querySubstrings = queryWithoutCase.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries); int currentQuerySubstringIndex = 0; var currentQuerySubstring = querySubstrings[currentQuerySubstringIndex]; @@ -77,15 +76,12 @@ namespace Flow.Launcher.Infrastructure bool spaceMet = false; - for (var compareStringIndex = 0; - compareStringIndex < fullStringToCompareWithoutCase.Length; - compareStringIndex++) + for (var compareStringIndex = 0; compareStringIndex < fullStringToCompareWithoutCase.Length; compareStringIndex++) { if (currentAcronymQueryIndex >= queryWithoutCase.Length || allQuerySubstringsMatched && acronymScore < (int) UserSettingSearchPrecision) break; - // To maintain a list of indices which correspond to spaces in the string to compare // To populate the list only for the first query substring if (fullStringToCompareWithoutCase[compareStringIndex] == ' ' && currentQuerySubstringIndex == 0)