diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-04 01:38:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 01:38:01 +0200 |
| commit | c020eea184b84ec9193f2bec5265bd72f4e86d24 (patch) | |
| tree | 3b1184fee57c0f0c038030808b8264021523024a /editor/plugins | |
| parent | 79b0a9ddfc41c5b9fe3bc903cab1001aefcedde2 (diff) | |
| parent | 929b98d24b53789b3e3fbbae90aed0fe0e72b409 (diff) | |
| download | redot-engine-c020eea184b84ec9193f2bec5265bd72f4e86d24.tar.gz | |
Merge pull request #40092 from hinlopen/remove-find-last
Remove String::find_last (same as rfind)
Diffstat (limited to 'editor/plugins')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 035526ca55..1312f59a70 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -710,11 +710,11 @@ void AnimationPlayerEditor::_dialog_action(String p_file) { Ref<Resource> res = ResourceLoader::load(p_file, "Animation"); ERR_FAIL_COND_MSG(res.is_null(), "Cannot load Animation from file '" + p_file + "'."); ERR_FAIL_COND_MSG(!res->is_class("Animation"), "Loaded resource from file '" + p_file + "' is not Animation."); - if (p_file.find_last("/") != -1) { - p_file = p_file.substr(p_file.find_last("/") + 1, p_file.length()); + if (p_file.rfind("/") != -1) { + p_file = p_file.substr(p_file.rfind("/") + 1, p_file.length()); } - if (p_file.find_last("\\") != -1) { - p_file = p_file.substr(p_file.find_last("\\") + 1, p_file.length()); + if (p_file.rfind("\\") != -1) { + p_file = p_file.substr(p_file.rfind("\\") + 1, p_file.length()); } if (p_file.find(".") != -1) { |
