summaryrefslogtreecommitdiff
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-07-25 12:52:58 +0200
committerGitHub <noreply@github.com>2021-07-25 12:52:58 +0200
commitff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63 (patch)
tree42543cc85d27d2c8692a2ced4bac5c537e402004 /scene/animation/animation_player.cpp
parent2f221e5fd507b176590bda52d08e499629ce7761 (diff)
parentac3322b0af8f23e8e2dac8111200bc69b5604c9f (diff)
Merge pull request #50809 from akien-mga/iterators-const-references
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 0f557519b2..67b6205a65 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -176,7 +176,7 @@ void AnimationPlayer::_get_property_list(List<PropertyInfo> *p_list) const {
anim_names.sort();
- for (PropertyInfo &E : anim_names) {
+ for (const PropertyInfo &E : anim_names) {
p_list->push_back(E);
}
@@ -1076,7 +1076,7 @@ void AnimationPlayer::get_animation_list(List<StringName> *p_animations) const {
anims.sort();
- for (String &E : anims) {
+ for (const String &E : anims) {
p_animations->push_back(E);
}
}
@@ -1118,7 +1118,7 @@ void AnimationPlayer::queue(const StringName &p_name) {
Vector<String> AnimationPlayer::get_queue() {
Vector<String> ret;
- for (StringName &E : queued) {
+ for (const StringName &E : queued) {
ret.push_back(E);
}
@@ -1502,7 +1502,7 @@ void AnimationPlayer::get_argument_options(const StringName &p_function, int p_i
if (p_idx == 0 && (p_function == "play" || p_function == "play_backwards" || p_function == "remove_animation" || p_function == "has_animation" || p_function == "queue")) {
List<StringName> al;
get_animation_list(&al);
- for (StringName &E : al) {
+ for (const StringName &E : al) {
r_options->push_back(quote_style + String(E) + quote_style);
}
}