Merge pull request #356 from sheepandshepherd/variantleak2

Add C conversion constructors and fix new leak
This commit is contained in:
Marc
2020-06-05 21:16:37 +01:00
committed by GitHub
3 changed files with 12 additions and 4 deletions

View File

@@ -57,6 +57,11 @@ class Object;
class Array {
godot_array _godot_array;
friend class Variant;
inline explicit Array(const godot_array &other) {
_godot_array = other;
}
public:
Array();
Array(const Array &other);

View File

@@ -12,6 +12,11 @@ namespace godot {
class Dictionary {
godot_dictionary _godot_dictionary;
friend Variant::operator Dictionary() const;
inline explicit Dictionary(const godot_dictionary &other) {
_godot_dictionary = other;
}
public:
Dictionary();
Dictionary(const Dictionary &other);