mirror of
https://github.com/monero-project/monero.git
synced 2025-07-30 04:48:50 -04:00
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.
This commit is contained in:
parent
0c6ea4f8a6
commit
8f96cfc20a
6 changed files with 17 additions and 26 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue