diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2022-06-27 13:10:04 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2022-06-27 13:33:06 -0700 |
commit | 9ddebc0c22866d6b7a7ff3fa64b67cc86c8664da (patch) | |
tree | 3bb41cb3143f197ca53ee93f7375598ef5886ec6 /core/variant/callable.h | |
parent | c41e4b10c3317f837d4b3ece2fb725a8067d884b (diff) |
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/callable.h')
-rw-r--r-- | core/variant/callable.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/variant/callable.h b/core/variant/callable.h index 6a760958d6..bbcf5427ba 100644 --- a/core/variant/callable.h +++ b/core/variant/callable.h @@ -61,6 +61,7 @@ public: CALL_ERROR_TOO_MANY_ARGUMENTS, // expected is number of arguments CALL_ERROR_TOO_FEW_ARGUMENTS, // expected is number of arguments CALL_ERROR_INSTANCE_IS_NULL, + CALL_ERROR_METHOD_NOT_CONST, }; Error error = Error::CALL_OK; int argument = 0; |