From 7b0ed2aa5e4b9d9807037d57f0fc80fe8dd6fb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Thu, 26 Aug 2021 21:37:17 +0200 Subject: Rename Variant::is_ref() to is_ref_counted() --- core/variant/variant.cpp | 2 +- core/variant/variant.h | 2 +- core/variant/variant_utility.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/variant') diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index db198da54a..0f981d0c9e 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -3256,7 +3256,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const return false; } -bool Variant::is_ref() const { +bool Variant::is_ref_counted() const { return type == OBJECT && _get_obj().id.is_ref_counted(); } diff --git a/core/variant/variant.h b/core/variant/variant.h index 0860e7fdc3..17988a46d7 100644 --- a/core/variant/variant.h +++ b/core/variant/variant.h @@ -287,7 +287,7 @@ public: static bool can_convert(Type p_type_from, Type p_type_to); static bool can_convert_strict(Type p_type_from, Type p_type_to); - bool is_ref() const; + bool is_ref_counted() const; _FORCE_INLINE_ bool is_num() const { return type == INT || type == FLOAT; } diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index 3fd8eb5474..60950099d2 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -433,7 +433,7 @@ struct VariantUtilityFunctions { static inline Variant weakref(const Variant &obj, Callable::CallError &r_error) { if (obj.get_type() == Variant::OBJECT) { r_error.error = Callable::CallError::CALL_OK; - if (obj.is_ref()) { + if (obj.is_ref_counted()) { Ref wref = memnew(WeakRef); REF r = obj; if (r.is_valid()) { -- cgit v1.2.3