Simplify found_question_marks tests

This commit is contained in:
Andrew Gasparovic 2020-06-15 07:47:29 -07:00 committed by Andreas Schuh
parent 84968c6bb2
commit f7388c6655

View file

@ -326,20 +326,9 @@ static void CanonicalizeCursorWordAndSearchOptions(
break;
}
if (found_question_marks == 3) {
options->flag_description_substring_search = true;
options->flag_location_substring_search = true;
options->flag_name_substring_search = true;
}
if (found_question_marks == 2) {
options->flag_location_substring_search = true;
options->flag_name_substring_search = true;
}
if (found_question_marks == 1) {
options->flag_name_substring_search = true;
}
if (found_question_marks > 2) options->flag_description_substring_search = true;
if (found_question_marks > 1) options->flag_location_substring_search = true;
if (found_question_marks > 0) options->flag_name_substring_search = true;
options->return_all_matching_flags = (found_plusses > 0);
}