From 7ad14e7a3e6f87ddc450f7e34621eb5200808451 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Sun, 27 Aug 2017 21:07:15 +0200 Subject: Dead code tells no tales --- core/reference.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'core/reference.cpp') 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 -- cgit v1.2.3-70-g09d2