aboutsummaryrefslogtreecommitdiff
path: root/core/array.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-01-11 08:53:31 -0300
committerJuan Linietsky2017-01-11 08:54:17 -0300
commite6583117df95373cffb12105de82d3816ca09f85 (patch)
tree9953c32a4b50db9cc99d0999c7904a27748a0ace /core/array.cpp
parent57166cd2923cc6d32b37c34f6ca2f32f6941e4a8 (diff)
downloadgodot-e6583117df95373cffb12105de82d3816ca09f85.tar.gz
godot-e6583117df95373cffb12105de82d3816ca09f85.tar.zst
godot-e6583117df95373cffb12105de82d3816ca09f85.zip
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() {