1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Use const references where possible for List range iterators

This commit is contained in:
Rémi Verschelde
2021-07-24 15:46:25 +02:00
parent a0f7f42b84
commit ac3322b0af
171 changed files with 649 additions and 650 deletions

View File

@@ -72,14 +72,14 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
List<StringName> names;
ap->get_animation_list(&names);
for (StringName &E : names) {
for (const StringName &E : names) {
animations_menu->add_icon_item(get_theme_icon(SNAME("Animation"), SNAME("EditorIcons")), E);
animations_to_add.push_back(E);
}
}
}
for (StringName &E : classes) {
for (const StringName &E : classes) {
String name = String(E).replace_first("AnimationNode", "");
if (name == "Animation") {
continue;
@@ -373,7 +373,7 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
open_file->clear_filters();
List<String> filters;
ResourceLoader::get_recognized_extensions_for_type("AnimationRootNode", &filters);
for (String &E : filters) {
for (const String &E : filters) {
open_file->add_filter("*." + E);
}
open_file->popup_file_dialog();