diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-06-28 09:00:29 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-06-28 09:11:24 +0100 |
commit | 8f96cfc20a92f00e5b87969d589c4ec360020366 (patch) | |
tree | f9a727ce5cfbb978d9bf08c98536d542ae107479 /src/cryptonote_protocol | |
parent | Merge pull request #2111 (diff) | |
download | monero-8f96cfc20a92f00e5b87969d589c4ec360020366.tar.xz |
Remove typeid use in network_address
Since I had to add an ID to the derived classes anyway,
this can be used instead. This removes an apparently
pointless warning from CLANG too.
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 0b99aa7bd..c5bc834ad 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -192,7 +192,7 @@ namespace cryptonote cnx.host = cntxt.m_remote_address.host_str(); cnx.ip = ""; cnx.port = ""; - if (cntxt.m_remote_address.type() == typeid(epee::net_utils::ipv4_network_address)) + if (cntxt.m_remote_address.get_type_id() == epee::net_utils::ipv4_network_address::ID) { cnx.ip = cnx.host; cnx.port = std::to_string(cntxt.m_remote_address.as<epee::net_utils::ipv4_network_address>().port()); |