From 929b98d24b53789b3e3fbbae90aed0fe0e72b409 Mon Sep 17 00:00:00 2001 From: Stijn Hinlopen Date: Fri, 3 Jul 2020 15:26:22 +0200 Subject: Remove String::find_last (same as rfind) --- scene/gui/file_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene') 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 { -- cgit v1.2.3