diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-11-16 18:52:15 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-11-17 10:02:18 +0100 |
commit | 68f638cf02cc595872c1a35b78cb1ce0039b1eef (patch) | |
tree | 311896361f77ee440b3bfd4c5b2f19f344f88333 /editor/gui | |
parent | 5efd124ca10bf46df62fa2441d80589777e54a5a (diff) | |
download | redot-engine-68f638cf02cc595872c1a35b78cb1ce0039b1eef.tar.gz |
Use `(r)find_char` instead of `(r)find` for single characters
Diffstat (limited to 'editor/gui')
-rw-r--r-- | editor/gui/editor_file_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index 12f00b7a57..0381609804 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -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 { |