Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Remove duplicate code via templated operator()
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Aug 14, 2019
1 parent 7c90551 commit 40a8be8
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,22 +755,8 @@ namespace eosio {
connection_ptr c;
explicit msg_handler( const connection_ptr& conn) : c(conn) {}

void operator()( const signed_block& msg ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}
void operator()( signed_block& msg ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}
void operator()( const packed_transaction& msg ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}
void operator()( packed_transaction& msg ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}
void operator()( signed_block&& msg ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}
void operator()( packed_transaction&& msg ) const {
template<typename T>
void operator()( const T& ) const {
EOS_ASSERT( false, plugin_config_exception, "Not implemented, call handle_message directly instead" );
}

Expand Down

0 comments on commit 40a8be8

Please sign in to comment.