Merge pull request #9660 from sheepandshepherd/dictionary_next

Expose Dictionary::next to GDNative
This commit is contained in:
Thomas Herzog 2017-07-15 23:31:29 +02:00 committed by GitHub
commit 6422b9d150
2 changed files with 9 additions and 1 deletions

View file

@ -124,11 +124,17 @@ void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p
}
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key) {
Array *self = (Array *)p_self;
Dictionary *self = (Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;
return (godot_variant *)&self->operator[](*key);
}
godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key) {
Dictionary *self = (Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;
return (godot_variant *)self->next(key);
}
godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b) {
const Dictionary *self = (const Dictionary *)p_self;
const Dictionary *b = (const Dictionary *)p_b;

View file

@ -74,6 +74,8 @@ void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key);
godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key);
godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b);
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self);