You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
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>
This commit is contained in:
@@ -190,6 +190,7 @@ public:
|
||||
return callp(p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args), cerr);
|
||||
}
|
||||
|
||||
virtual Variant call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); // implement if language supports const functions
|
||||
virtual void notification(int p_notification) = 0;
|
||||
virtual String to_string(bool *r_valid) {
|
||||
if (r_valid) {
|
||||
|
||||
Reference in New Issue
Block a user