aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.cpp
diff options
context:
space:
mode:
authorAaron Hook <ahook@protonmail.com>2019-12-29 13:04:02 -0800
committerRene Pickhardt <r.pickhardt@gmail.com>2020-06-22 12:12:22 +0200
commit1cabbddbca615b26aa4510c75f459c28d6fe0afd (patch)
tree04459232e1ee90d4e5a2ba8f625c903177beeff3 /src/netaddress.cpp
parent8ef15e8a86038225afef2487ca23abc10ca5dffa (diff)
downloadbitcoin-1cabbddbca615b26aa4510c75f459c28d6fe0afd.tar.xz
refactor: Use uint16_t instead of unsigned short
removed trailing whitespace to make linter happy
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r--src/netaddress.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index f79425a52e..6744391616 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -3,6 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <cstdint>
#include <netaddress.h>
#include <hash.h>
#include <util/strencodings.h>
@@ -627,15 +628,15 @@ CService::CService() : port(0)
{
}
-CService::CService(const CNetAddr& cip, unsigned short portIn) : CNetAddr(cip), port(portIn)
+CService::CService(const CNetAddr& cip, uint16_t portIn) : CNetAddr(cip), port(portIn)
{
}
-CService::CService(const struct in_addr& ipv4Addr, unsigned short portIn) : CNetAddr(ipv4Addr), port(portIn)
+CService::CService(const struct in_addr& ipv4Addr, uint16_t portIn) : CNetAddr(ipv4Addr), port(portIn)
{
}
-CService::CService(const struct in6_addr& ipv6Addr, unsigned short portIn) : CNetAddr(ipv6Addr), port(portIn)
+CService::CService(const struct in6_addr& ipv6Addr, uint16_t portIn) : CNetAddr(ipv6Addr), port(portIn)
{
}
@@ -663,7 +664,7 @@ bool CService::SetSockAddr(const struct sockaddr *paddr)
}
}
-unsigned short CService::GetPort() const
+uint16_t CService::GetPort() const
{
return port;
}