Use (r)find_char instead of (r)find for single characters

This commit is contained in:
A Thousand Ships 2024-11-16 18:52:15 +01:00
parent 5efd124ca1
commit 68f638cf02
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
70 changed files with 169 additions and 169 deletions

View file

@ -156,7 +156,7 @@ void EditorFileDialog::popup_file_dialog() {
}
void EditorFileDialog::_focus_file_text() {
int lp = file->get_text().rfind(".");
int lp = file->get_text().rfind_char('.');
if (lp != -1) {
file->select(0, lp);
file->grab_focus();
@ -1263,7 +1263,7 @@ void EditorFileDialog::set_current_path(const String &p_path) {
if (!p_path.size()) {
return;
}
int pos = MAX(p_path.rfind("/"), p_path.rfind("\\"));
int pos = MAX(p_path.rfind_char('/'), p_path.rfind_char('\\'));
if (pos == -1) {
set_current_file(p_path);
} else {