diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-08-26 21:37:17 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2022-01-20 18:46:25 +0100 |
commit | 7b0ed2aa5e4b9d9807037d57f0fc80fe8dd6fb39 (patch) | |
tree | 8a0d5a5d7725280f4d0fb7aa81a867cfa319061f /core/variant | |
parent | 8b8e858778bbf9e0dad66335f351920332c547de (diff) |
Rename Variant::is_ref() to is_ref_counted()
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant.cpp | 2 | ||||
-rw-r--r-- | core/variant/variant.h | 2 | ||||
-rw-r--r-- | core/variant/variant_utility.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
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<WeakRef> wref = memnew(WeakRef); REF r = obj; if (r.is_valid()) { |