mirror of
https://github.com/godotengine/godot.git
synced 2025-10-21 08:53:35 +00:00
Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
This commit is contained in:
parent
922348f4c0
commit
21637dfc25
59 changed files with 417 additions and 467 deletions
|
@ -81,7 +81,7 @@ protected:
|
|||
public:
|
||||
Variant getvar(const Variant &p_key, bool *r_valid = nullptr) const override;
|
||||
void setvar(const Variant &p_key, const Variant &p_value, bool *r_valid = nullptr) override;
|
||||
Variant call(const StringName &p_method, const Variant **p_args, int p_argc, Callable::CallError &r_error) override;
|
||||
Variant callp(const StringName &p_method, const Variant **p_args, int p_argc, Callable::CallError &r_error) override;
|
||||
JavaScriptObjectImpl() {}
|
||||
JavaScriptObjectImpl(int p_id) { _js_id = p_id; }
|
||||
~JavaScriptObjectImpl() {
|
||||
|
@ -231,7 +231,7 @@ int JavaScriptObjectImpl::_variant2js(const void **p_args, int p_pos, godot_js_w
|
|||
return type;
|
||||
}
|
||||
|
||||
Variant JavaScriptObjectImpl::call(const StringName &p_method, const Variant **p_args, int p_argc, Callable::CallError &r_error) {
|
||||
Variant JavaScriptObjectImpl::callp(const StringName &p_method, const Variant **p_args, int p_argc, Callable::CallError &r_error) {
|
||||
godot_js_wrapper_ex exchange;
|
||||
const String method = p_method;
|
||||
void *lock = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue