summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_player_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-07-24 15:46:25 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-07-25 12:22:25 +0200
commitac3322b0af8f23e8e2dac8111200bc69b5604c9f (patch)
tree59a079f13b5c03c2dd3328a26c55f3618e6014f6 /editor/plugins/animation_player_editor_plugin.cpp
parenta0f7f42b842462646281f5c4c9a8db070e034adc (diff)
downloadredot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz
Use const references where possible for List range iterators
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 1bdbc2980c..4ba9147955 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -350,7 +350,7 @@ void AnimationPlayerEditor::_animation_load() {
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Animation", &extensions);
- for (String &E : extensions) {
+ for (const String &E : extensions) {
file->add_filter("*." + E + " ; " + E.to_upper());
}
@@ -584,7 +584,7 @@ void AnimationPlayerEditor::_animation_blend() {
blend_editor.next->clear();
blend_editor.next->add_item("", i);
- for (StringName &to : anims) {
+ for (const StringName &to : anims) {
TreeItem *blend = blend_editor.tree->create_item(root);
blend->set_editable(0, false);
blend->set_editable(1, true);
@@ -829,7 +829,7 @@ void AnimationPlayerEditor::_update_player() {
}
int active_idx = -1;
- for (StringName &E : animlist) {
+ for (const StringName &E : animlist) {
Ref<Texture2D> icon;
if (E == player->get_autoplay()) {
if (E == "RESET") {
@@ -965,7 +965,7 @@ void AnimationPlayerEditor::_animation_duplicate() {
Ref<Animation> new_anim = memnew(Animation);
List<PropertyInfo> plist;
anim->get_property_list(&plist);
- for (PropertyInfo &E : plist) {
+ for (const PropertyInfo &E : plist) {
if (E.usage & PROPERTY_USAGE_STORAGE) {
new_anim->set(E.name, anim->get(E.name));
}