aboutsummaryrefslogtreecommitdiff
path: root/core/reference.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-08-27 21:07:15 +0200
committerRémi Verschelde2017-08-27 22:13:45 +0200
commit7ad14e7a3e6f87ddc450f7e34621eb5200808451 (patch)
tree8804d0dd24cc126087462edfbbbf73ed61b56b0e /core/reference.cpp
parent37da8155a4500a9386027b4d791a86186bc7ab4a (diff)
downloadgodot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.gz
godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.zst
godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.zip
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 936da899c..bb70628cb 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