Browse Source

Core Callable: fixed variant call caster

Use same call to VariantCaster in release build as used in VariantCasterAndValidate::call method
Sergey Minakov 5 years ago
parent
commit
8e9a07c401
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/callable_method_pointer.h

+ 2 - 2
core/callable_method_pointer.h

@@ -131,7 +131,7 @@ void call_with_variant_args_helper(T *p_instance, void (T::*p_method)(P...), con
 #ifdef DEBUG_METHODS_ENABLED
 #ifdef DEBUG_METHODS_ENABLED
 	(p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
 	(p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
 #else
 #else
-	(p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
+	(p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 #endif
 #endif
 }
 }
 
 
@@ -228,7 +228,7 @@ void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), co
 #ifdef DEBUG_METHODS_ENABLED
 #ifdef DEBUG_METHODS_ENABLED
 	r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
 	r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
 #else
 #else
-	(p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
+	(p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
 #endif
 #endif
 }
 }