diff options
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_tree.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index d6c5d0b51c..8f644face5 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -57,7 +57,7 @@ void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const { } anims += String(names[i]); } - if (anims != String()) { + if (!anims.is_empty()) { property.hint = PROPERTY_HINT_ENUM; property.hint_string = anims; } diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index c8fa8bf395..31a1d4d64c 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -52,7 +52,7 @@ void AnimationNodeStateMachineTransition::set_advance_condition(const StringName String cs = p_condition; ERR_FAIL_COND(cs.find("/") != -1 || cs.find(":") != -1); advance_condition = p_condition; - if (cs != String()) { + if (!cs.is_empty()) { advance_condition_name = "conditions/" + cs; } else { advance_condition_name = StringName(); 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); diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 57c615a6ab..527946b9de 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -138,7 +138,7 @@ real_t AnimationNode::_pre_process(const StringName &p_base_path, AnimationNode void AnimationNode::make_invalid(const String &p_reason) { ERR_FAIL_COND(!state); state->valid = false; - if (state->invalid_reasons != String()) { + if (!state->invalid_reasons.is_empty()) { state->invalid_reasons += "\n"; } state->invalid_reasons += String::utf8("• ") + p_reason; |