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

Add ConstIterator to Dictionary.

This commit is contained in:
Yufeng Ying
2025-03-12 06:43:48 +08:00
parent 74907876d3
commit bebe037abf
34 changed files with 131 additions and 179 deletions

View File

@@ -67,10 +67,8 @@ Vector<String> Translation::get_translated_message_list() const {
}
void Translation::_set_messages(const Dictionary &p_messages) {
List<Variant> keys;
p_messages.get_key_list(&keys);
for (const Variant &E : keys) {
translation_map[E] = p_messages[E];
for (const KeyValue<Variant, Variant> &kv : p_messages) {
translation_map[kv.key] = kv.value;
}
}