You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Use range iterators for Map
This commit is contained in:
@@ -93,8 +93,8 @@ Dictionary Script::_get_script_constant_map() {
|
||||
Dictionary ret;
|
||||
Map<StringName, Variant> map;
|
||||
get_constants(&map);
|
||||
for (Map<StringName, Variant>::Element *E = map.front(); E; E = E->next()) {
|
||||
ret[E->key()] = E->value();
|
||||
for (const KeyValue<StringName, Variant> &E : map) {
|
||||
ret[E.key] = E.value;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user