summaryrefslogtreecommitdiff
path: root/core/reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/reference.cpp')
-rw-r--r--core/reference.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/core/reference.cpp b/core/reference.cpp
index 936da899ca..bb70628cbe 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -124,44 +124,3 @@ void WeakRef::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_ref"), &WeakRef::get_ref);
}
-#if 0
-
-Reference * RefBase::get_reference_from_ref(const RefBase &p_base) {
-
- return p_base.get_reference();
-}
-void RefBase::ref_inc(Reference *p_reference) {
-
- p_reference->refcount.ref();
-}
-bool RefBase::ref_dec(Reference *p_reference) {
-
- bool ref = p_reference->refcount.unref();
- return ref;
-}
-
-Reference *RefBase::first_ref(Reference *p_reference) {
-
- if (p_reference->refcount.ref()) {
-
- // this may fail in the scenario of two threads assigning the pointer for the FIRST TIME
- // at the same time, which is never likely to happen (would be crazy to do)
- // so don't do it.
-
- if (p_reference->refcount_init.get()>0) {
- p_reference->refcount_init.unref();
- p_reference->refcount.unref(); // first referencing is already 1, so compensate for the ref above
- }
-
- return p_reference;
- } else {
-
- return 0;
- }
-
-}
-char * RefBase::get_refptr_data(const RefPtr &p_refptr) const {
-
- return p_refptr.data;
-}
-#endif