Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.cpp
Show First 20 Lines • Show All 507 Lines • ▼ Show 20 Lines | bool CService::SetSockAddr(const struct sockaddr *paddr) { | ||||
} | } | ||||
} | } | ||||
unsigned short CService::GetPort() const { | unsigned short CService::GetPort() const { | ||||
return port; | return port; | ||||
} | } | ||||
bool operator==(const CService &a, const CService &b) { | 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) { | bool operator<(const CService &a, const CService &b) { | ||||
jasonbcox: 2 missing from this file | |||||
nakihitoAuthorUnsubmitted Done Inline ActionsDeadalnix got one of them here: https://reviews.bitcoinabc.org/D1875. The other is for a function that no longer exists. nakihito: Deadalnix got one of them here: https://reviews.bitcoinabc.org/D1875. The other is for a… | |||||
return static_cast<CNetAddr>(a) < static_cast<CNetAddr>(b) || | return static_cast<CNetAddr>(a) < static_cast<CNetAddr>(b) || | ||||
(static_cast<CNetAddr>(a) == static_cast<CNetAddr>(b) && | (static_cast<CNetAddr>(a) == static_cast<CNetAddr>(b) && | ||||
a.port < b.port); | a.port < b.port); | ||||
} | } | ||||
bool CService::GetSockAddr(struct sockaddr *paddr, socklen_t *addrlen) const { | bool CService::GetSockAddr(struct sockaddr *paddr, socklen_t *addrlen) const { | ||||
if (IsIPv4()) { | if (IsIPv4()) { | ||||
if (*addrlen < (socklen_t)sizeof(struct sockaddr_in)) { | if (*addrlen < (socklen_t)sizeof(struct sockaddr_in)) { | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |
2 missing from this file