aboutsummaryrefslogtreecommitdiff
path: root/core/array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/array.cpp')
-rw-r--r--core/array.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/core/array.cpp b/core/array.cpp
index 50cc9eee4..b9c8f543d 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -36,7 +36,6 @@ struct ArrayPrivate {
SafeRefCount refcount;
Vector<Variant> array;
- bool shared;
};
void Array::_ref(const Array& p_from) const {
@@ -54,20 +53,9 @@ void Array::_ref(const Array& p_from) const {
_unref();
- if (_fp->shared) {
+ _p = p_from._p;
- _p = p_from._p;
- } else {
-
- _p = memnew( ArrayPrivate );
- _p->shared=false;
- _p->refcount.init();
- _p->array=_fp->array;
-
- if (_fp->refcount.unref())
- memdelete(_fp);
- }
}
void Array::_unref() const {
@@ -106,10 +94,6 @@ void Array::clear() {
_p->array.clear();
}
-bool Array::is_shared() const {
-
- return _p->shared;
-}
bool Array::operator==(const Array& p_array) const {
@@ -316,11 +300,11 @@ Array::Array(const Array& p_from) {
_ref(p_from);
}
-Array::Array(bool p_shared) {
+Array::Array() {
_p = memnew( ArrayPrivate );
_p->refcount.init();
- _p->shared=p_shared;
+
}
Array::~Array() {