diff --git a/src/net/IPv4Address.hxx b/src/net/IPv4Address.hxx index b55204397..3f33529cf 100644 --- a/src/net/IPv4Address.hxx +++ b/src/net/IPv4Address.hxx @@ -170,7 +170,7 @@ public: * Return a downcasted reference to the address. This call is * only legal after verifying SocketAddress::GetFamily(). */ - static constexpr const IPv4Address &Cast(const SocketAddress &src) noexcept { + static constexpr const IPv4Address &Cast(const SocketAddress src) noexcept { /* this reinterpret_cast works because this class is just a wrapper for struct sockaddr_in */ return *(const IPv4Address *)(const void *)src.GetAddress(); diff --git a/src/net/IPv6Address.hxx b/src/net/IPv6Address.hxx index 3ef6f7319..8b53339f5 100644 --- a/src/net/IPv6Address.hxx +++ b/src/net/IPv6Address.hxx @@ -139,7 +139,7 @@ public: * Return a downcasted reference to the address. This call is * only legal after verifying SocketAddress::GetFamily(). */ - static constexpr const IPv6Address &Cast(const SocketAddress &src) noexcept { + static constexpr const IPv6Address &Cast(const SocketAddress src) noexcept { /* this reinterpret_cast works because this class is just a wrapper for struct sockaddr_in6 */ return *(const IPv6Address *)(const void *)src.GetAddress();