aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-11-01 16:32:53 -0400
committerPieter Wuille <pieter@wuille.net>2021-11-29 17:58:53 -0500
commit568dd2f83900a11a4dbba1250722791a135bf0a9 (patch)
treeb9091ef5f60075570c9f0e0c487282450e152ec0 /src/netaddress.cpp
parent383d350bd5107bfe00e3b90a00cab9a3c1397c72 (diff)
Replace MakeSpan helper with Span deduction guide
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r--src/netaddress.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index 7f1dd698b0..eb67445baf 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);
@@ -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);
}