You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Use const references where possible for List range iterators
This commit is contained in:
@@ -512,7 +512,7 @@ void AnimationNodeStateMachine::get_parameter_list(List<PropertyInfo> *r_list) c
|
||||
}
|
||||
|
||||
advance_conditions.sort_custom<StringName::AlphCompare>();
|
||||
for (StringName &E : advance_conditions) {
|
||||
for (const StringName &E : advance_conditions) {
|
||||
r_list->push_back(PropertyInfo(Variant::BOOL, E));
|
||||
}
|
||||
}
|
||||
@@ -679,7 +679,7 @@ void AnimationNodeStateMachine::get_node_list(List<StringName> *r_nodes) const {
|
||||
}
|
||||
nodes.sort_custom<StringName::AlphCompare>();
|
||||
|
||||
for (StringName &E : nodes) {
|
||||
for (const StringName &E : nodes) {
|
||||
r_nodes->push_back(E);
|
||||
}
|
||||
}
|
||||
@@ -902,7 +902,7 @@ void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) c
|
||||
}
|
||||
names.sort_custom<StringName::AlphCompare>();
|
||||
|
||||
for (StringName &name : names) {
|
||||
for (const StringName &name : names) {
|
||||
p_list->push_back(PropertyInfo(Variant::OBJECT, "states/" + name + "/node", PROPERTY_HINT_RESOURCE_TYPE, "AnimationNode", PROPERTY_USAGE_NOEDITOR));
|
||||
p_list->push_back(PropertyInfo(Variant::VECTOR2, "states/" + name + "/position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user