aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/p2p_protocol_defs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-06-28 09:00:29 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-06-28 09:11:24 +0100
commit8f96cfc20a92f00e5b87969d589c4ec360020366 (patch)
treef9a727ce5cfbb978d9bf08c98536d542ae107479 /src/p2p/p2p_protocol_defs.h
parentMerge pull request #2111 (diff)
downloadmonero-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/p2p/p2p_protocol_defs.h')
-rw-r--r--src/p2p/p2p_protocol_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/p2p_protocol_defs.h b/src/p2p/p2p_protocol_defs.h
index d60990f8a..a471211a6 100644
--- a/src/p2p/p2p_protocol_defs.h
+++ b/src/p2p/p2p_protocol_defs.h
@@ -188,7 +188,7 @@ namespace nodetool
std::list<peerlist_entry_base<network_address_old>> local_peerlist;
for (const auto &p: this_ref.local_peerlist_new)
{
- if (p.adr.type() == typeid(epee::net_utils::ipv4_network_address))
+ if (p.adr.get_type_id() == epee::net_utils::ipv4_network_address::ID)
{
const epee::net_utils::network_address &na = p.adr;
const epee::net_utils::ipv4_network_address &ipv4 = na.as<const epee::net_utils::ipv4_network_address>();
@@ -247,7 +247,7 @@ namespace nodetool
std::list<peerlist_entry_base<network_address_old>> local_peerlist;
for (const auto &p: this_ref.local_peerlist_new)
{
- if (p.adr.type() == typeid(epee::net_utils::ipv4_network_address))
+ if (p.adr.get_type_id() == epee::net_utils::ipv4_network_address::ID)
{
const epee::net_utils::network_address &na = p.adr;
const epee::net_utils::ipv4_network_address &ipv4 = na.as<const epee::net_utils::ipv4_network_address>();