diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-01 14:56:06 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-01 14:56:06 +0100 |
commit | c1377920cdf919e7316e43f5039c46ac91fd96e0 (patch) | |
tree | 0a865a1885f183aecdb170b3d0fbfc4e7bb6c935 /scene/animation/animation_player.cpp | |
parent | 1e950dea5aeec11227c2f84e1f0256601ead23ac (diff) | |
parent | cd2032a90b7b1a499ccf08fbf62d70e0ac9bb8fa (diff) | |
download | redot-engine-c1377920cdf919e7316e43f5039c46ac91fd96e0.tar.gz |
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r-- | scene/animation/animation_player.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index d6b7be7020..d46470282f 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -725,9 +725,10 @@ double AnimationPlayer::get_blend_time(const StringName &p_animation1, const Str } } +#ifdef TOOLS_ENABLED void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const { - String pf = p_function; - if (p_idx == 0 && (p_function == "play" || p_function == "play_backwards" || p_function == "has_animation" || p_function == "queue")) { + const String pf = p_function; + if (p_idx == 0 && (pf == "play" || pf == "play_backwards" || pf == "has_animation" || pf == "queue")) { List<StringName> al; get_animation_list(&al); for (const StringName &name : al) { @@ -736,6 +737,7 @@ void AnimationPlayer::get_argument_options(const StringName &p_function, int p_i } AnimationMixer::get_argument_options(p_function, p_idx, r_options); } +#endif void AnimationPlayer::_animation_removed(const StringName &p_name, const StringName &p_library) { AnimationMixer::_animation_removed(p_name, p_library); |