mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2025-07-09 19:22:07 +00: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
|
@ -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<epee::net_utils::ipv4_network_address>().ip(),
|
||||
entry.adr.as<epee::net_utils::ipv4_network_address>().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<epee::net_utils::ipv4_network_address>().ip(),
|
||||
entry.adr.as<epee::net_utils::ipv4_network_address>().port(), entry.last_seen);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue