diff options
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r-- | src/netaddress.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 7f1dd698b0..f6bc7fbb94 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -196,7 +196,7 @@ static void Checksum(Span<const uint8_t> addr_pubkey, uint8_t (&checksum)[CHECKS SHA3_256 hasher; - hasher.Write(MakeSpan(prefix).first(prefix_len)); + hasher.Write(Span{prefix}.first(prefix_len)); hasher.Write(addr_pubkey); hasher.Write(VERSION); @@ -303,7 +303,7 @@ CNetAddr::CNetAddr(const struct in_addr& ipv4Addr) CNetAddr::CNetAddr(const struct in6_addr& ipv6Addr, const uint32_t scope) { - SetLegacyIPv6(Span<const uint8_t>(reinterpret_cast<const uint8_t*>(&ipv6Addr), sizeof(ipv6Addr))); + SetLegacyIPv6({reinterpret_cast<const uint8_t*>(&ipv6Addr), sizeof(ipv6Addr)}); m_scope_id = scope; } @@ -693,13 +693,13 @@ uint32_t CNetAddr::GetLinkedIPv4() const return ReadBE32(m_addr.data()); } else if (IsRFC6052() || IsRFC6145()) { // mapped IPv4, SIIT translated IPv4: the IPv4 address is the last 4 bytes of the address - return ReadBE32(MakeSpan(m_addr).last(ADDR_IPV4_SIZE).data()); + return ReadBE32(Span{m_addr}.last(ADDR_IPV4_SIZE).data()); } else if (IsRFC3964()) { // 6to4 tunneled IPv4: the IPv4 address is in bytes 2-6 - return ReadBE32(MakeSpan(m_addr).subspan(2, ADDR_IPV4_SIZE).data()); + return ReadBE32(Span{m_addr}.subspan(2, ADDR_IPV4_SIZE).data()); } else if (IsRFC4380()) { // Teredo tunneled IPv4: the IPv4 address is in the last 4 bytes of the address, but bitflipped - return ~ReadBE32(MakeSpan(m_addr).last(ADDR_IPV4_SIZE).data()); + return ~ReadBE32(Span{m_addr}.last(ADDR_IPV4_SIZE).data()); } assert(false); } |