Browse Source

Silenced compiler warning in godot::call_with_variant_args_ret_helper

= 1 week ago
parent
commit
3eb3069e09
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/godot_cpp/core/binder_common.hpp

+ 2 - 1
include/godot_cpp/core/binder_common.hpp

@@ -262,6 +262,7 @@ void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), co
 #else
 #else
 	r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 	r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 #endif
 #endif
+	(void)p_args; // Avoid warning.
 }
 }
 
 
 template <typename T, typename R, typename... P, size_t... Is>
 template <typename T, typename R, typename... P, size_t... Is>
@@ -273,7 +274,7 @@ void call_with_variant_args_retc_helper(T *p_instance, R (T::*p_method)(P...) co
 #else
 #else
 	r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 	r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 #endif
 #endif
-	(void)p_args;
+	(void)p_args; // Avoid warning.
 }
 }
 
 
 template <typename T, typename... P>
 template <typename T, typename... P>