Browse Source

Remove unused `initialize_ref`

rune-scape 1 year ago
parent
commit
c8b697c64c
3 changed files with 0 additions and 12 deletions
  1. 0 7
      core/variant/variant.cpp
  2. 0 1
      core/variant/variant.h
  3. 0 4
      core/variant/variant_internal.h

+ 0 - 7
core/variant/variant.cpp

@@ -1072,13 +1072,6 @@ bool Variant::is_null() const {
 	}
 	}
 }
 }
 
 
-bool Variant::initialize_ref(Object *p_object) {
-	RefCounted *ref_counted = const_cast<RefCounted *>(static_cast<const RefCounted *>(p_object));
-	if (!ref_counted->init_ref()) {
-		return false;
-	}
-	return true;
-}
 void Variant::reference(const Variant &p_variant) {
 void Variant::reference(const Variant &p_variant) {
 	switch (type) {
 	switch (type) {
 		case NIL:
 		case NIL:

+ 0 - 1
core/variant/variant.h

@@ -254,7 +254,6 @@ private:
 	} _data alignas(8);
 	} _data alignas(8);
 
 
 	void reference(const Variant &p_variant);
 	void reference(const Variant &p_variant);
-	static bool initialize_ref(Object *p_object);
 
 
 	void _clear_internal();
 	void _clear_internal();
 
 

+ 0 - 4
core/variant/variant_internal.h

@@ -125,10 +125,6 @@ public:
 		}
 		}
 	}
 	}
 
 
-	_FORCE_INLINE_ static bool initialize_ref(Object *object) {
-		return Variant::initialize_ref(object);
-	}
-
 	// Atomic types.
 	// Atomic types.
 	_FORCE_INLINE_ static bool *get_bool(Variant *v) { return &v->_data._bool; }
 	_FORCE_INLINE_ static bool *get_bool(Variant *v) { return &v->_data._bool; }
 	_FORCE_INLINE_ static const bool *get_bool(const Variant *v) { return &v->_data._bool; }
 	_FORCE_INLINE_ static const bool *get_bool(const Variant *v) { return &v->_data._bool; }