From 8f96cfc20a92f00e5b87969d589c4ec360020366 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 28 Jun 2017 09:00:29 +0100 Subject: 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. --- src/rpc/core_rpc_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc') diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 18d1cea75..97fe18696 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -736,7 +736,7 @@ namespace cryptonote for (auto & entry : white_list) { - if (entry.adr.type() == typeid(epee::net_utils::ipv4_network_address)) + if (entry.adr.get_type_id() == epee::net_utils::ipv4_network_address::ID) res.white_list.emplace_back(entry.id, entry.adr.as().ip(), entry.adr.as().port(), entry.last_seen); else @@ -745,7 +745,7 @@ namespace cryptonote for (auto & entry : gray_list) { - if (entry.adr.type() == typeid(epee::net_utils::ipv4_network_address)) + if (entry.adr.get_type_id() == epee::net_utils::ipv4_network_address::ID) res.gray_list.emplace_back(entry.id, entry.adr.as().ip(), entry.adr.as().port(), entry.last_seen); else -- cgit v1.2.3