You've already forked godot
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user