Remove warning: 'nk_to_upper' defined but not used
There is function `NK_INTERN int nk_to_upper(int c)` in `UTIL` section. Implementation is almost the same to `NK_INTERN int nk_to_lower(int c)`. But only `nk_to_lower` used in Nuklear's code. To remove this warning we can: 1) Comment i.e. remove `nk_to_upper` from code. But it can break someone's code, if he used it in module with `NK_IMPLEMENTATION` defined. 2) Hide it under define. Same. 3) Just use it somewhere in code. I replaced two calls of `nk_to_lower` to `nk_to_upper`. It removes the warning, code works the same. The bad side - complication of the code. "Why `nk_to_upper` is used here, but not `nk_to_lower` as one line up?" Maybe there exists better solution? Or just add the comment about this line to code?
This commit is contained in:
parent
4a3573b032
commit
7d52c0de67
@ -3740,7 +3740,7 @@ nk_strmatch_fuzzy_text(const char *str, int str_len,
|
|||||||
|
|
||||||
int next_match = *pattern_iter != '\0' &&
|
int next_match = *pattern_iter != '\0' &&
|
||||||
nk_to_lower(pattern_letter) == nk_to_lower(str_letter);
|
nk_to_lower(pattern_letter) == nk_to_lower(str_letter);
|
||||||
int rematch = best_letter && nk_to_lower(*best_letter) == nk_to_lower(str_letter);
|
int rematch = best_letter && nk_to_upper(*best_letter) == nk_to_upper(str_letter);
|
||||||
|
|
||||||
int advanced = next_match && best_letter;
|
int advanced = next_match && best_letter;
|
||||||
int pattern_repeat = best_letter && *pattern_iter != '\0';
|
int pattern_repeat = best_letter && *pattern_iter != '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user