summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_construct.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-06-11 19:46:25 +0200
committerGitHub <noreply@github.com>2021-06-11 19:46:25 +0200
commit530e069bc3efef4de535a1973aa016698ffbe334 (patch)
tree19d1bf18c36af394a7a2111ec94c633617ea7118 /core/variant/variant_construct.cpp
parent50d1e0ea99dfa9a127cf99029cd71a1b0931c617 (diff)
parent04688b92fff1d6bbec9335b354f3751ddc473379 (diff)
downloadredot-engine-530e069bc3efef4de535a1973aa016698ffbe334.tar.gz
Merge pull request #49312 from RandomShaper/reference_to_ref_count
Rename `Reference` to `RefCounted`
Diffstat (limited to 'core/variant/variant_construct.cpp')
-rw-r--r--core/variant/variant_construct.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp
index f66f33ef93..9e3ab5897b 100644
--- a/core/variant/variant_construct.cpp
+++ b/core/variant/variant_construct.cpp
@@ -836,9 +836,9 @@ String Variant::get_constructor_argument_name(Variant::Type p_type, int p_constr
void VariantInternal::object_assign(Variant *v, const Object *o) {
if (o) {
- if (o->is_reference()) {
- Reference *reference = const_cast<Reference *>(static_cast<const Reference *>(o));
- if (!reference->init_ref()) {
+ if (o->is_ref_counted()) {
+ RefCounted *ref_counted = const_cast<RefCounted *>(static_cast<const RefCounted *>(o));
+ if (!ref_counted->init_ref()) {
v->_get_obj().obj = nullptr;
v->_get_obj().id = ObjectID();
return;