From 0f52f925b15cbe6a8a37e9478ac0ce12cd1e0228 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Thu, 29 Mar 2018 01:44:16 -0300 Subject: [PATCH] Allow passing types by reference to action methods --- contracts/eosiolib/dispatcher.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/eosiolib/dispatcher.hpp b/contracts/eosiolib/dispatcher.hpp index 7e8c6d0d6..fb4cf7891 100644 --- a/contracts/eosiolib/dispatcher.hpp +++ b/contracts/eosiolib/dispatcher.hpp @@ -37,18 +37,16 @@ namespace eosio { return eosio::dispatch( code, act ); } - - template bool execute_action( T* obj, void (T::*func)(Args...) ) { char buffer[action_data_size()]; read_action_data( buffer, sizeof(buffer) ); - auto args = unpack>( buffer, sizeof(buffer) ); + + auto args = unpack...>>( buffer, sizeof(buffer) ); auto f2 = [&]( auto... a ){ (obj->*func)( a... ); }; -// apply( obj, func, args ); boost::mp11::tuple_apply( f2, args ); return true; -- GitLab