diff options
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 83c2b53241..320c47e820 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -485,7 +485,7 @@ void AnimationPlayerEditor::_animation_name_edited() { player->stop(); String new_name = name->get_text(); - if (new_name.is_empty() || new_name.find(":") != -1 || new_name.find("/") != -1) { + if (new_name.is_empty() || new_name.contains(":") || new_name.contains("/")) { error_dialog->set_text(TTR("Invalid animation name!")); error_dialog->popup_centered(); return; @@ -746,7 +746,7 @@ void AnimationPlayerEditor::_load_animations(Vector<String> p_files) { file = file.substr(file.rfind("\\") + 1, file.length()); } - if (file.find(".") != -1) { + if (file.contains(".")) { file = file.substr(0, file.find(".")); } |