diff options
author | David Snopek <dsnopek@gmail.com> | 2024-01-04 08:35:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 08:35:46 -0600 |
commit | 8d13acca919daa09f2db68e4de36a59199ce6b55 (patch) | |
tree | fc022c2eb0cb7a76303cdc7166127d4b8cf980a9 /include/godot_cpp | |
parent | b1769a70f08d12b4d35b9884081f04f2bc883604 (diff) | |
parent | b77cb648c34bd0a34e866a47fe053d74bbb32f25 (diff) | |
download | redot-cpp-8d13acca919daa09f2db68e4de36a59199ce6b55.tar.gz |
Merge pull request #1346 from AThousandShips/arg_fix
Fix expected argument count for call errors
Diffstat (limited to 'include/godot_cpp')
-rw-r--r-- | include/godot_cpp/core/binder_common.hpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/include/godot_cpp/core/binder_common.hpp b/include/godot_cpp/core/binder_common.hpp index a51e15e..ce90acd 100644 --- a/include/godot_cpp/core/binder_common.hpp +++ b/include/godot_cpp/core/binder_common.hpp @@ -281,13 +281,13 @@ void call_with_variant_args(T *p_instance, void (T::*p_method)(P...), const Vari #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } if ((size_t)p_argcount < sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -299,13 +299,13 @@ void call_with_variant_args_ret(T *p_instance, R (T::*p_method)(P...), const Var #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } if ((size_t)p_argcount < sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -317,13 +317,13 @@ void call_with_variant_args_retc(T *p_instance, R (T::*p_method)(P...) const, co #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } if ((size_t)p_argcount < sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -335,7 +335,7 @@ void call_with_variant_args_dv(T *p_instance, void (T::*p_method)(P...), const G #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -346,7 +346,7 @@ void call_with_variant_args_dv(T *p_instance, void (T::*p_method)(P...), const G #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -370,7 +370,7 @@ void call_with_variant_argsc_dv(T *p_instance, void (T::*p_method)(P...) const, #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -381,7 +381,7 @@ void call_with_variant_argsc_dv(T *p_instance, void (T::*p_method)(P...) const, #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -405,7 +405,7 @@ void call_with_variant_args_ret_dv(T *p_instance, R (T::*p_method)(P...), const #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -416,7 +416,7 @@ void call_with_variant_args_ret_dv(T *p_instance, R (T::*p_method)(P...), const #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -440,7 +440,7 @@ void call_with_variant_args_retc_dv(T *p_instance, R (T::*p_method)(P...) const, #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -451,7 +451,7 @@ void call_with_variant_args_retc_dv(T *p_instance, R (T::*p_method)(P...) const, #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -552,7 +552,7 @@ void call_with_variant_args_static_dv(void (*p_method)(P...), const GDExtensionC #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = sizeof...(P); + r_error.expected = sizeof...(P); return; } #endif @@ -563,7 +563,7 @@ void call_with_variant_args_static_dv(void (*p_method)(P...), const GDExtensionC #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = sizeof...(P); + r_error.expected = sizeof...(P); return; } #endif @@ -597,13 +597,13 @@ void call_with_variant_args_static_ret(R (*p_method)(P...), const Variant **p_ar #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } if ((size_t)p_argcount < sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -615,13 +615,13 @@ void call_with_variant_args_static_ret(void (*p_method)(P...), const Variant **p #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } if ((size_t)p_argcount < sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = (int32_t)sizeof...(P); + r_error.expected = (int32_t)sizeof...(P); return; } #endif @@ -644,7 +644,7 @@ void call_with_variant_args_static_ret_dv(R (*p_method)(P...), const GDExtension #ifdef DEBUG_ENABLED if ((size_t)p_argcount > sizeof...(P)) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS; - r_error.argument = sizeof...(P); + r_error.expected = sizeof...(P); return; } #endif @@ -655,7 +655,7 @@ void call_with_variant_args_static_ret_dv(R (*p_method)(P...), const GDExtension #ifdef DEBUG_ENABLED if (missing > dvs) { r_error.error = GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS; - r_error.argument = sizeof...(P); + r_error.expected = sizeof...(P); return; } #endif |