summaryrefslogtreecommitdiffstats
path: root/core/variant/variant.h
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2022-06-27 13:10:04 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2022-06-27 13:33:06 -0700
commit9ddebc0c22866d6b7a7ff3fa64b67cc86c8664da (patch)
tree3bb41cb3143f197ca53ee93f7375598ef5886ec6 /core/variant/variant.h
parentc41e4b10c3317f837d4b3ece2fb725a8067d884b (diff)
downloadredot-engine-9ddebc0c22866d6b7a7ff3fa64b67cc86c8664da.tar.gz
Add a const call mode to Object, Variant and Script.
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz <reduzio@gmail.com>
Diffstat (limited to 'core/variant/variant.h')
-rw-r--r--core/variant/variant.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/variant/variant.h b/core/variant/variant.h
index 992d9cad40..83d244145b 100644
--- a/core/variant/variant.h
+++ b/core/variant/variant.h
@@ -555,6 +555,7 @@ public:
return ret;
}
+ void call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error);
static void call_static(Variant::Type p_type, const StringName &p_method, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error);
static String get_call_error_text(const StringName &p_method, const Variant **p_argptrs, int p_argcount, const Callable::CallError &ce);