summaryrefslogtreecommitdiff
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorNathan Franke <natfra@pm.me>2021-12-09 03:42:46 -0600
committerNathan Franke <natfra@pm.me>2021-12-09 04:48:38 -0600
commit49403cbfa0399bb4284ea5c36cc90216a0bda6ff (patch)
treecaa6c7249d35d83b288a180a4f5d7e4fd959704f /scene/animation/animation_player.cpp
parent31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (diff)
Replace String comparisons with "", String() to is_empty()
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index b9435b6692..d603106696 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1416,7 +1416,7 @@ bool AnimationPlayer::is_playing() const {
}
void AnimationPlayer::set_current_animation(const String &p_anim) {
- if (p_anim == "[stop]" || p_anim == "") {
+ if (p_anim == "[stop]" || p_anim.is_empty()) {
stop();
} else if (!is_playing() || playback.assigned != p_anim) {
play(p_anim);