mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-28 11:11:16 -06:00
Added map for save Group and Category values for each option
+ Some code refactoring in Tab (the translation of the titles moved to the OptionGroups) and Search + Fixed assert in fts_fuzzy_match
This commit is contained in:
parent
218abacb75
commit
167f7cf5de
11 changed files with 373 additions and 298 deletions
|
|
@ -181,12 +181,14 @@ namespace fts {
|
|||
// Check for bonuses based on neighbor character value
|
||||
if (currIdx > 0) {
|
||||
// Camel case
|
||||
char neighbor = strBegin[currIdx - 1];
|
||||
char curr = strBegin[currIdx];
|
||||
if (::islower(neighbor) && ::isupper(curr))
|
||||
// ::islower() expects an unsigned char in range of 0 to 255.
|
||||
unsigned char uneighbor = ((unsigned char *)strBegin)[currIdx - 1];
|
||||
unsigned char ucurr = ((unsigned char*)strBegin)[currIdx];
|
||||
if (::islower(uneighbor) && ::isupper(ucurr))
|
||||
outScore += camel_bonus;
|
||||
|
||||
// Separator
|
||||
char neighbor = strBegin[currIdx - 1];
|
||||
bool neighborSeparator = neighbor == '_' || neighbor == ' ';
|
||||
if (neighborSeparator)
|
||||
outScore += separator_bonus;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue