1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

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
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 {