aboutsummaryrefslogtreecommitdiff
path: root/core/object.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-08-25 08:37:38 +0200
committerGitHub2017-08-25 08:37:38 +0200
commit490aef93699abc00da58f73b1596fb3473fd53c6 (patch)
tree7912c7a540eca6b09392bbd2aa2f30fefe37f51a /core/object.cpp
parentb1c0e45b03aa14453846c9a888763077eef2476b (diff)
parentcacced7e507f7603bacc03ae2616e58f0ede122a (diff)
downloadgodot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.gz
godot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.zst
godot-490aef93699abc00da58f73b1596fb3473fd53c6.zip
Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
Diffstat (limited to 'core/object.cpp')
-rw-r--r--core/object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 928e9bb97..5e6c809f7 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -654,7 +654,7 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args,
if (p_method == CoreStringNames::get_singleton()->_free) {
#ifdef DEBUG_ENABLED
- if (cast_to<Reference>()) {
+ if (Object::cast_to<Reference>(this)) {
ERR_EXPLAIN("Can't 'free' a reference.");
ERR_FAIL();
return;
@@ -900,7 +900,7 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a
r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
return Variant();
}
- if (cast_to<Reference>()) {
+ if (Object::cast_to<Reference>(this)) {
r_error.argument = 0;
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
ERR_EXPLAIN("Can't 'free' a reference.");