Fuzzy matching of parameters in the search box:

Fix of https://github.com/forrestthewoods/lib_fts/issues/21 finally applied,
disabled CamelCase matching as we are not using CamelCase in Slicer parameters.
This commit is contained in:
bubnikv 2020-05-04 16:18:20 +02:00
parent 28c0880b24
commit 95cf8c2d30

View File

@ -93,7 +93,7 @@ namespace fts {
// Recursion count is input / output to track the maximum depth reached.
// Was given by reference &recursionCount, see discussion in https://github.com/forrestthewoods/lib_fts/issues/21
// int & recursionCount,
int & recursionCount,
int recursionCount,
int recursionLimit)
{
// Count recursions
@ -202,10 +202,12 @@ namespace fts {
if (i > 0 && currIdx == matches[i - 1] + 1)
// Sequential
outScore += sequential_bonus;
/*
// Camel case
char_type prev = strBegin[currIdx - 1];
if (std::islower(prev) && std::isupper(strBegin[currIdx]))
outScore += camel_bonus;
*/
// Separator
if (prev == '_' || prev == ' ')
outScore += separator_bonus;