summaryrefslogtreecommitdiff
path: root/core/extension
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-03-09 14:58:40 +0100
committerreduz <reduzio@gmail.com>2022-03-09 18:39:13 +0100
commit21637dfc2535a00f531b8b664c1e66ba34d11eb0 (patch)
treebfe6059eedfd5a4233d7d4b46d60703e342860d8 /core/extension
parent922348f4c00e694961a7c9717abdcd0310c11973 (diff)
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.
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/gdnative_interface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/extension/gdnative_interface.cpp b/core/extension/gdnative_interface.cpp
index 385117eed1..d9ec42dc9d 100644
--- a/core/extension/gdnative_interface.cpp
+++ b/core/extension/gdnative_interface.cpp
@@ -80,7 +80,7 @@ static void gdnative_variant_call(GDNativeVariantPtr p_self, const GDNativeStrin
const Variant **args = (const Variant **)p_args;
Variant ret;
Callable::CallError error;
- self->call(*method, args, p_argcount, ret, error);
+ self->callp(*method, args, p_argcount, ret, error);
memnew_placement(r_return, Variant(ret));
if (r_error) {
@@ -152,7 +152,7 @@ static void gdnative_variant_set_indexed(GDNativeVariantPtr p_self, GDNativeInt
bool valid;
bool oob;
- self->set_indexed(p_index, value, valid, oob);
+ self->set_indexed(p_index, *value, valid, oob);
*r_valid = valid;
*r_oob = oob;
}