diff options
| author | Thomas Herzog <thomas.herzog@mail.com> | 2018-01-18 23:55:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-18 23:55:01 +0100 |
| commit | 131cf2581e05897ecb40ad527a01cd9068c58628 (patch) | |
| tree | 3920894002c6201122a55045e41cf81638b11b7b /include/core | |
| parent | 753c5b712fdba0d4bc0cd0ae989209f758935db6 (diff) | |
| parent | 07a36732f12e3b94204c1bd4278269892b8982a6 (diff) | |
| download | redot-cpp-131cf2581e05897ecb40ad527a01cd9068c58628.tar.gz | |
Merge pull request #72 from Zylann/fix_poolarrays_read_write
Added copy constructors to PoolArray Read and Write
Diffstat (limited to 'include/core')
| -rw-r--r-- | include/core/PoolArrays.hpp | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/include/core/PoolArrays.hpp b/include/core/PoolArrays.hpp index b1c8fec..1513c09 100644 --- a/include/core/PoolArrays.hpp +++ b/include/core/PoolArrays.hpp @@ -24,6 +24,14 @@ public: friend class PoolByteArray; godot_pool_byte_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_byte_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_byte_array_read_access_destroy(_read_access); } @@ -45,6 +53,13 @@ public: friend class PoolByteArray; godot_pool_byte_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_byte_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_byte_array_write_access_destroy(_write_access); @@ -105,6 +120,14 @@ public: friend class PoolIntArray; godot_pool_int_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_int_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_int_array_read_access_destroy(_read_access); } @@ -126,6 +149,13 @@ public: friend class PoolIntArray; godot_pool_int_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_int_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_int_array_write_access_destroy(_write_access); @@ -186,6 +216,14 @@ public: friend class PoolRealArray; godot_pool_real_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_real_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_real_array_read_access_destroy(_read_access); } @@ -207,6 +245,13 @@ public: friend class PoolRealArray; godot_pool_real_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_real_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_real_array_write_access_destroy(_write_access); @@ -267,6 +312,14 @@ public: friend class PoolStringArray; godot_pool_string_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_string_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_string_array_read_access_destroy(_read_access); } @@ -288,6 +341,13 @@ public: friend class PoolStringArray; godot_pool_string_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_string_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_string_array_write_access_destroy(_write_access); @@ -349,6 +409,14 @@ public: friend class PoolVector2Array; godot_pool_vector2_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_vector2_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_vector2_array_read_access_destroy(_read_access); } @@ -370,6 +438,13 @@ public: friend class PoolVector2Array; godot_pool_vector2_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_vector2_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_vector2_array_write_access_destroy(_write_access); @@ -430,6 +505,14 @@ public: friend class PoolVector3Array; godot_pool_vector3_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_vector3_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_vector3_array_read_access_destroy(_read_access); } @@ -451,6 +534,13 @@ public: friend class PoolVector3Array; godot_pool_vector3_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_vector3_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_vector3_array_write_access_destroy(_write_access); @@ -511,6 +601,14 @@ public: friend class PoolColorArray; godot_pool_color_array_read_access *_read_access; public: + inline Read() { + _read_access = NULL; + } + + inline Read(const Read & p_other) { + _read_access = godot::api->godot_pool_color_array_read_access_copy(p_other._read_access); + } + inline ~Read() { godot::api->godot_pool_color_array_read_access_destroy(_read_access); } @@ -532,6 +630,13 @@ public: friend class PoolColorArray; godot_pool_color_array_write_access *_write_access; public: + inline Write() { + _write_access = NULL; + } + + inline Write(const Write & p_other) { + _write_access = godot::api->godot_pool_color_array_write_access_copy(p_other._write_access); + } inline ~Write() { godot::api->godot_pool_color_array_write_access_destroy(_write_access); |
