summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-08-26 21:37:17 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2022-01-20 18:46:25 +0100
commit7b0ed2aa5e4b9d9807037d57f0fc80fe8dd6fb39 (patch)
tree8a0d5a5d7725280f4d0fb7aa81a867cfa319061f /core/variant
parent8b8e858778bbf9e0dad66335f351920332c547de (diff)
Rename Variant::is_ref() to is_ref_counted()
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/variant.cpp2
-rw-r--r--core/variant/variant.h2
-rw-r--r--core/variant/variant_utility.cpp2
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()) {