You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Dead code tells no tales
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user