diff options
author | Aaron Hook <ahook@protonmail.com> | 2019-12-29 13:04:02 -0800 |
---|---|---|
committer | Rene Pickhardt <r.pickhardt@gmail.com> | 2020-06-22 12:12:22 +0200 |
commit | 1cabbddbca615b26aa4510c75f459c28d6fe0afd (patch) | |
tree | 04459232e1ee90d4e5a2ba8f625c903177beeff3 /src/netaddress.h | |
parent | 8ef15e8a86038225afef2487ca23abc10ca5dffa (diff) |
refactor: Use uint16_t instead of unsigned short
removed trailing whitespace to make linter happy
Diffstat (limited to 'src/netaddress.h')
-rw-r--r-- | src/netaddress.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/netaddress.h b/src/netaddress.h index e640c07d32..d7ab537cf6 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -12,7 +12,7 @@ #include <compat.h> #include <serialize.h> -#include <stdint.h> +#include <cstdint> #include <string> #include <vector> @@ -142,10 +142,10 @@ class CService : public CNetAddr public: CService(); - CService(const CNetAddr& ip, unsigned short port); - CService(const struct in_addr& ipv4Addr, unsigned short port); + CService(const CNetAddr& ip, uint16_t port); + CService(const struct in_addr& ipv4Addr, uint16_t port); explicit CService(const struct sockaddr_in& addr); - unsigned short GetPort() const; + uint16_t GetPort() const; bool GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const; bool SetSockAddr(const struct sockaddr* paddr); friend bool operator==(const CService& a, const CService& b); @@ -156,7 +156,7 @@ class CService : public CNetAddr std::string ToStringPort() const; std::string ToStringIPPort() const; - CService(const struct in6_addr& ipv6Addr, unsigned short port); + CService(const struct in6_addr& ipv6Addr, uint16_t port); explicit CService(const struct sockaddr_in6& addr); SERIALIZE_METHODS(CService, obj) { READWRITE(obj.ip, Using<BigEndianFormatter<2>>(obj.port)); } |