diff options
author | sheepandshepherd <sheepandshepherd@hotmail.com> | 2017-07-15 23:02:19 +0200 |
---|---|---|
committer | sheepandshepherd <sheepandshepherd@hotmail.com> | 2017-07-15 23:02:19 +0200 |
commit | 914a68723f8e9a578d55a0287281e02d5c463832 (patch) | |
tree | 569818b179ffdd21e5a525d7cc0aad1a049baa90 /modules | |
parent | a5b7c2200ccc184157d4055c80751a7454f3e0e9 (diff) |
Expose Dictionary::next to GDNative
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/godot/godot_dictionary.cpp | 8 | ||||
-rw-r--r-- | modules/gdnative/godot/godot_dictionary.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/gdnative/godot/godot_dictionary.cpp b/modules/gdnative/godot/godot_dictionary.cpp index 12c40f0564..a14a86248b 100644 --- a/modules/gdnative/godot/godot_dictionary.cpp +++ b/modules/gdnative/godot/godot_dictionary.cpp @@ -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; diff --git a/modules/gdnative/godot/godot_dictionary.h b/modules/gdnative/godot/godot_dictionary.h index 0325670b15..4ded0d38da 100644 --- a/modules/gdnative/godot/godot_dictionary.h +++ b/modules/gdnative/godot/godot_dictionary.h @@ -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); |