summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-04 01:38:01 +0200
committerGitHub <noreply@github.com>2020-07-04 01:38:01 +0200
commitc020eea184b84ec9193f2bec5265bd72f4e86d24 (patch)
tree3b1184fee57c0f0c038030808b8264021523024a /scene
parent79b0a9ddfc41c5b9fe3bc903cab1001aefcedde2 (diff)
parent929b98d24b53789b3e3fbbae90aed0fe0e72b409 (diff)
Merge pull request #40092 from hinlopen/remove-find-last
Remove String::find_last (same as rfind)
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/file_dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 41ca6458af..1e0d3d9f7b 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -604,7 +604,7 @@ void FileDialog::set_current_file(const String &p_file) {
file->set_text(p_file);
update_dir();
invalidate();
- int lp = p_file.find_last(".");
+ int lp = p_file.rfind(".");
if (lp != -1) {
file->select(0, lp);
if (file->is_inside_tree() && !get_tree()->is_node_being_edited(file)) {
@@ -617,7 +617,7 @@ void FileDialog::set_current_path(const String &p_path) {
if (!p_path.size()) {
return;
}
- int pos = MAX(p_path.find_last("/"), p_path.find_last("\\"));
+ int pos = MAX(p_path.rfind("/"), p_path.rfind("\\"));
if (pos == -1) {
set_current_file(p_path);
} else {