aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.cpp
diff options
context:
space:
mode:
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 fa1c191559..4f231d73c8 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -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