pass large parameters by const ref, not value

Coverity 136394 136397 136409 136526 136529 136533 175302
This commit is contained in:
moneromooo-monero 2018-02-02 18:45:12 +00:00
parent 61defd89e3
commit 2e3e90acbe
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
7 changed files with 14 additions and 14 deletions

View file

@ -108,7 +108,7 @@ namespace epee
}
template<class t_result, class t_arg, class callback_t, class t_transport>
bool async_invoke_remote_command2(boost::uuids::uuid conn_id, int command, const t_arg& out_struct, t_transport& transport, callback_t cb, size_t inv_timeout = LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
bool async_invoke_remote_command2(boost::uuids::uuid conn_id, int command, const t_arg& out_struct, t_transport& transport, const callback_t &cb, size_t inv_timeout = LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
{
typename serialization::portable_storage stg;
const_cast<t_arg&>(out_struct).store(stg);//TODO: add true const support to searilzation