aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-07-09 16:33:26 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-07-09 16:56:05 +0200
commit0d69fdb9a0e3edab45f2749cf026afe509a550e9 (patch)
tree0ccf53ba1473e2a5a16a4b82994f47feba6fb823 /src/netaddress.h
parent22ccc27046a83c05df08dcc4ccfecbad96563115 (diff)
parent1cabbddbca615b26aa4510c75f459c28d6fe0afd (diff)
downloadbitcoin-0d69fdb9a0e3edab45f2749cf026afe509a550e9.tar.xz
Merge #19314: refactor: Use uint16_t instead of unsigned short
1cabbddbca615b26aa4510c75f459c28d6fe0afd refactor: Use uint16_t instead of unsigned short (Aaron Hook) Pull request description: I wanted to see if the `up for grabs` label works and looked at PR #17822 originally opend by ahook I saw it had many acks for example by jonatack and practicalswift but needed rebasing. So I checked out the remote branch rebased it resolved three conflicts and continued the rebase. Hope everything is as expected (: ACKs for top commit: sipsorcery: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd. practicalswift: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd -- patch looks correct :) laanwj: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd hebasto: ACK 1cabbddbca615b26aa4510c75f459c28d6fe0afd, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 0e6bf64f274aae5dacb188358b4d5f65ccb207d4f70922f039bc4ed7934709418ddad19f8bfb7462517427837c3d2bb3f86ef284bb40e87119aad2a1e148d9d6
Diffstat (limited to 'src/netaddress.h')
-rw-r--r--src/netaddress.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/netaddress.h b/src/netaddress.h
index 552abc4119..c201012154 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>
@@ -143,10 +143,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);
@@ -157,7 +157,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)); }