mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +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
|
@ -485,14 +485,14 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
|
|||
return success;
|
||||
}
|
||||
|
||||
Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
|
||||
Variant JavaClass::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
|
||||
Variant ret;
|
||||
bool found = _call_method(nullptr, p_method, p_args, p_argcount, r_error, ret);
|
||||
if (found) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return RefCounted::call(p_method, p_args, p_argcount, r_error);
|
||||
return RefCounted::callp(p_method, p_args, p_argcount, r_error);
|
||||
}
|
||||
|
||||
JavaClass::JavaClass() {
|
||||
|
@ -500,7 +500,7 @@ JavaClass::JavaClass() {
|
|||
|
||||
/////////////////////
|
||||
|
||||
Variant JavaObject::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
|
||||
Variant JavaObject::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
|
||||
return Variant();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue