From 2e3e90acbe62272901046f754b62ee7ec0d516d9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 2 Feb 2018 18:45:12 +0000 Subject: pass large parameters by const ref, not value Coverity 136394 136397 136409 136526 136529 136533 175302 --- src/p2p/net_node.h | 2 +- src/p2p/net_node.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/p2p') diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 20520f83c..4f2d2b4cf 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -214,7 +214,7 @@ namespace nodetool void add_upnp_port_mapping(uint32_t port); void delete_upnp_port_mapping(uint32_t port); template - bool try_ping(basic_node_data& node_data, p2p_connection_context& context, t_callback cb); + bool try_ping(basic_node_data& node_data, p2p_connection_context& context, const t_callback &cb); bool try_get_support_flags(const p2p_connection_context& context, std::function f); bool make_expected_connections_count(PeerType peer_type, size_t expected_connections); void cache_connect_fail_info(const epee::net_utils::network_address& addr); diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 152dba942..6e6e12009 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1477,7 +1477,7 @@ namespace nodetool } //----------------------------------------------------------------------------------- template template - bool node_server::try_ping(basic_node_data& node_data, p2p_connection_context& context, t_callback cb) + bool node_server::try_ping(basic_node_data& node_data, p2p_connection_context& context, const t_callback &cb) { if(!node_data.my_port) return false; -- cgit v1.2.3