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

Do not iterate Dictionary with get_key_at_index.

This commit is contained in:
Yufeng Ying
2025-03-14 03:54:04 +08:00
parent af2c713971
commit bbc380b07e
6 changed files with 27 additions and 27 deletions

View File

@@ -794,8 +794,8 @@ public:
if (p_dict.has("enums")) {
enums = p_dict["enums"];
}
for (int i = 0; i < enums.size(); i++) {
doc.enums[enums.get_key_at_index(i)] = EnumDoc::from_dict(enums.get_value_at_index(i));
for (const KeyValue<Variant, Variant> &kv : enums) {
doc.enums[kv.key] = EnumDoc::from_dict(kv.value);
}
Array properties;