summaryrefslogtreecommitdiffstats
path: root/include/core/PoolArrays.hpp
diff options
context:
space:
mode:
authorMarc <marc.gilleron@gmail.com>2021-01-31 20:15:44 +0000
committerGitHub <noreply@github.com>2021-01-31 20:15:44 +0000
commite8de1fa2a5e2974c273fde35bc5ecac375ae98ec (patch)
tree286a8e2e25c18fe11f346835b3021afae2e9b77f /include/core/PoolArrays.hpp
parent05ba977cc60653952b73dc03498ebc7a93cef120 (diff)
parentb400dba87534640eeddbcdb6b319335a6a7639d8 (diff)
downloadredot-cpp-e8de1fa2a5e2974c273fde35bc5ecac375ae98ec.tar.gz
Merge pull request #490 from Zylann/container_leaks
Fix container and string leaks
Diffstat (limited to 'include/core/PoolArrays.hpp')
-rw-r--r--include/core/PoolArrays.hpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/core/PoolArrays.hpp b/include/core/PoolArrays.hpp
index 89172af..9421e83 100644
--- a/include/core/PoolArrays.hpp
+++ b/include/core/PoolArrays.hpp
@@ -18,6 +18,12 @@ class Array;
class PoolByteArray {
godot_pool_byte_array _godot_array;
+ friend class String;
+ friend class Variant;
+ inline explicit PoolByteArray(godot_pool_byte_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
@@ -116,6 +122,11 @@ public:
class PoolIntArray {
godot_pool_int_array _godot_array;
+ friend class Variant;
+ explicit inline PoolIntArray(godot_pool_int_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolIntArray;
@@ -213,6 +224,11 @@ public:
class PoolRealArray {
godot_pool_real_array _godot_array;
+ friend class Variant;
+ explicit inline PoolRealArray(godot_pool_real_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolRealArray;
@@ -310,6 +326,12 @@ public:
class PoolStringArray {
godot_pool_string_array _godot_array;
+ friend class String;
+ friend class Variant;
+ explicit inline PoolStringArray(godot_pool_string_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolStringArray;
@@ -407,6 +429,11 @@ public:
class PoolVector2Array {
godot_pool_vector2_array _godot_array;
+ friend class Variant;
+ explicit inline PoolVector2Array(godot_pool_vector2_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolVector2Array;
@@ -504,6 +531,11 @@ public:
class PoolVector3Array {
godot_pool_vector3_array _godot_array;
+ friend class Variant;
+ explicit inline PoolVector3Array(godot_pool_vector3_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolVector3Array;
@@ -601,6 +633,11 @@ public:
class PoolColorArray {
godot_pool_color_array _godot_array;
+ friend class Variant;
+ explicit inline PoolColorArray(godot_pool_color_array a) {
+ _godot_array = a;
+ }
+
public:
class Read {
friend class PoolColorArray;