diff options
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r-- | src/netaddress.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp index b8a261c921..1547d9bcac 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -526,17 +526,17 @@ unsigned short CService::GetPort() const bool operator==(const CService& a, const CService& b) { - return (CNetAddr)a == (CNetAddr)b && a.port == b.port; + return static_cast<CNetAddr>(a) == static_cast<CNetAddr>(b) && a.port == b.port; } bool operator!=(const CService& a, const CService& b) { - return (CNetAddr)a != (CNetAddr)b || a.port != b.port; + return static_cast<CNetAddr>(a) != static_cast<CNetAddr>(b) || a.port != b.port; } bool operator<(const CService& a, const CService& b) { - return (CNetAddr)a < (CNetAddr)b || ((CNetAddr)a == (CNetAddr)b && a.port < b.port); + return static_cast<CNetAddr>(a) < static_cast<CNetAddr>(b) || (static_cast<CNetAddr>(a) == static_cast<CNetAddr>(b) && a.port < b.port); } bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const |