epee: remove backward compatible endian specific address serialization

This commit is contained in:
moneromooo-monero 2019-12-04 21:22:11 +00:00
parent 39a343d76e
commit 3004835b51
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 6 deletions

View File

@ -94,17 +94,13 @@ namespace net_utils
BEGIN_KV_SERIALIZE_MAP() BEGIN_KV_SERIALIZE_MAP()
if (is_store) if (is_store)
{ {
KV_SERIALIZE_VAL_POD_AS_BLOB_N(m_ip, "ip")
uint32_t ip = SWAP32LE(this_ref.m_ip); uint32_t ip = SWAP32LE(this_ref.m_ip);
epee::serialization::selector<is_store>::serialize(ip, stg, hparent_section, "m_ip"); epee::serialization::selector<is_store>::serialize(ip, stg, hparent_section, "m_ip");
} }
else else
{ {
if (!epee::serialization::selector<is_store>::serialize_t_val_as_blob(this_ref.m_ip, stg, hparent_section, "ip")) KV_SERIALIZE(m_ip)
{ const_cast<ipv4_network_address&>(this_ref).m_ip = SWAP32LE(this_ref.m_ip);
KV_SERIALIZE(m_ip)
const_cast<ipv4_network_address&>(this_ref).m_ip = SWAP32LE(this_ref.m_ip);
}
} }
KV_SERIALIZE(m_port) KV_SERIALIZE(m_port)
END_KV_SERIALIZE_MAP() END_KV_SERIALIZE_MAP()