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 81f72879f4..4f231d73c8 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -522,17 +522,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 |