net/IPv4Address: pass reference to Cast()
This commit is contained in:
parent
0642ce4795
commit
adc5c5db88
@ -172,7 +172,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_in6 */
|
||||
return *(const IPv4Address *)(const void *)src.GetAddress();
|
||||
|
Loading…
Reference in New Issue
Block a user