mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Fix for fuzzy search function
Ref T97
This commit is contained in:
committed by
Mathew Sutcliffe
parent
c8a9f76a32
commit
3b6edcd575
@@ -89,16 +89,16 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
// char after
|
||||
const int a = p + 1;
|
||||
if (a < bStr.length() && aStr[p] == bStr[a])
|
||||
const int after = p + 1;
|
||||
if (after < bStr.length() && aStr[p] == bStr[after])
|
||||
{
|
||||
points += 0.5;
|
||||
continue;
|
||||
}
|
||||
|
||||
// char before
|
||||
const int b = p - 1;
|
||||
if (b >= 0 && aStr[p] == bStr[b])
|
||||
const int before = p - 1;
|
||||
if (before >= 0 && before < bStr.length() && aStr[p] == bStr[before])
|
||||
{
|
||||
points += 0.5;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user