You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Add ConstIterator to Dictionary.
This commit is contained in:
@@ -1288,11 +1288,9 @@ Variant Variant::get(const Variant &p_index, bool *r_valid, VariantGetError *err
|
||||
void Variant::get_property_list(List<PropertyInfo> *p_list) const {
|
||||
if (type == DICTIONARY) {
|
||||
const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem);
|
||||
List<Variant> keys;
|
||||
dic->get_key_list(&keys);
|
||||
for (const Variant &E : keys) {
|
||||
if (E.is_string()) {
|
||||
p_list->push_back(PropertyInfo(dic->get_valid(E).get_type(), E));
|
||||
for (const KeyValue<Variant, Variant> &kv : *dic) {
|
||||
if (kv.key.is_string()) {
|
||||
p_list->push_back(PropertyInfo(dic->get_valid(kv.key).get_type(), kv.key));
|
||||
}
|
||||
}
|
||||
} else if (type == OBJECT) {
|
||||
|
||||
Reference in New Issue
Block a user