diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-05-06 10:26:10 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-05-08 12:48:01 +0200 |
commit | b4c6cc7d82d1fcdb3bed734c4e22c19e012c84df (patch) | |
tree | 9d29900c69482a9fc491f4c842e56028d9d049a9 /editor/input_event_configuration_dialog.cpp | |
parent | 281fe39929303a8ef12e72ff7999b849bbe0678d (diff) | |
download | redot-engine-b4c6cc7d82d1fcdb3bed734c4e22c19e012c84df.tar.gz |
[Core] Add case-insensitive `String::containsn`
Diffstat (limited to 'editor/input_event_configuration_dialog.cpp')
-rw-r--r-- | editor/input_event_configuration_dialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp index a667f94a62..143de82765 100644 --- a/editor/input_event_configuration_dialog.cpp +++ b/editor/input_event_configuration_dialog.cpp @@ -285,7 +285,7 @@ void InputEventConfigurationDialog::_update_input_list() { for (int i = 0; i < keycode_get_count(); i++) { String name = keycode_get_name_by_index(i); - if (!search_term.is_empty() && name.findn(search_term) == -1) { + if (!search_term.is_empty() && !name.containsn(search_term)) { continue; } @@ -309,7 +309,7 @@ void InputEventConfigurationDialog::_update_input_list() { mb->set_button_index(mouse_buttons[i]); String desc = EventListenerLineEdit::get_event_text(mb, false); - if (!search_term.is_empty() && desc.findn(search_term) == -1) { + if (!search_term.is_empty() && !desc.containsn(search_term)) { continue; } @@ -332,7 +332,7 @@ void InputEventConfigurationDialog::_update_input_list() { joyb->set_button_index((JoyButton)i); String desc = EventListenerLineEdit::get_event_text(joyb, false); - if (!search_term.is_empty() && desc.findn(search_term) == -1) { + if (!search_term.is_empty() && !desc.containsn(search_term)) { continue; } @@ -358,7 +358,7 @@ void InputEventConfigurationDialog::_update_input_list() { joym->set_axis_value(direction); String desc = EventListenerLineEdit::get_event_text(joym, false); - if (!search_term.is_empty() && desc.findn(search_term) == -1) { + if (!search_term.is_empty() && !desc.containsn(search_term)) { continue; } |