refactor: Use uint16_t instead of unsigned short

removed trailing whitespace to make linter happy
This commit is contained in:
Aaron Hook
2019-12-29 13:04:02 -08:00
committed by Rene Pickhardt
parent 8ef15e8a86
commit 1cabbddbca
9 changed files with 28 additions and 22 deletions

View File

@@ -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)); }