diff options
author | sheepandshepherd <sheepandshepherd@hotmail.com> | 2017-05-31 00:03:50 +0200 |
---|---|---|
committer | sheepandshepherd <sheepandshepherd@hotmail.com> | 2017-05-31 00:03:50 +0200 |
commit | 9f34bb4ebe1e7d5b08b27acc7af216d3b27cd37e (patch) | |
tree | f6415a9aedb663f99bff32ad4643b22a538dd720 /modules/gdnative/godot/godot_array.cpp | |
parent | 5567e898d1052c1e2c2d32d3c37dfd957f4dc4bd (diff) | |
download | redot-engine-9f34bb4ebe1e7d5b08b27acc7af216d3b27cd37e.tar.gz |
Wrap copy constructor for some GDNative types
Diffstat (limited to 'modules/gdnative/godot/godot_array.cpp')
-rw-r--r-- | modules/gdnative/godot/godot_array.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdnative/godot/godot_array.cpp b/modules/gdnative/godot/godot_array.cpp index bf2ef35972..8cf6d1b8ef 100644 --- a/modules/gdnative/godot/godot_array.cpp +++ b/modules/gdnative/godot/godot_array.cpp @@ -49,6 +49,12 @@ void GDAPI godot_array_new(godot_array *p_arr) { memnew_placement(a, Array); } +void GDAPI godot_array_new_copy(godot_array *p_dest, const godot_array *p_src) { + Array *dest = (Array *)p_dest; + const Array *src = (const Array *)p_src; + memnew_placement(dest, Array(*src)); +} + void GDAPI godot_array_new_pool_color_array(godot_array *p_arr, const godot_pool_color_array *p_pca) { Array *a = (Array *)p_arr; PoolVector<Color> *pca = (PoolVector<Color> *)p_pca; |