mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Do not iterate Dictionary with get_key_at_index.
This commit is contained in:
parent
af2c713971
commit
bbc380b07e
6 changed files with 27 additions and 27 deletions
|
|
@ -407,9 +407,9 @@ void EditorPropertyOTVariation::update_property() {
|
|||
|
||||
Dictionary supported = (fd.is_valid()) ? fd->get_supported_variation_list() : Dictionary();
|
||||
|
||||
for (int i = 0; i < supported.size(); i++) {
|
||||
int name_tag = supported.get_key_at_index(i);
|
||||
Vector3i range = supported.get_value_at_index(i);
|
||||
for (const KeyValue<Variant, Variant> &kv : supported) {
|
||||
const int &name_tag = kv.key;
|
||||
const Vector3i &range = kv.value;
|
||||
if ((dict.has(name_tag) && dict[name_tag].get_type() == Variant::NIL) || !dict.has(name_tag)) {
|
||||
dict[name_tag] = range.z;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue