aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorPieter Wuille <sipa@ulyssis.org>2012-01-17 02:12:35 +0100
committerPieter Wuille <sipa@ulyssis.org>2012-01-17 02:12:35 +0100
commitc981d768b3cb0cf0879b3d70d3b548692fff0882 (patch)
tree3b350bb166cb07d8df1542b6fa0dc12614a8c1e8 /src/netbase.h
parent8498c591448d01a8a8ccc5ad1e8cbee9dbcf1500 (diff)
Fix handling of default ports
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/netbase.h b/src/netbase.h
index b12fb0045a..04ced18260 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -39,8 +39,8 @@ class CNetAddr
public:
CNetAddr();
CNetAddr(const struct in_addr& ipv4Addr);
- CNetAddr(const char *pszIp, bool fAllowLookup = false);
- CNetAddr(const std::string &strIp, bool fAllowLookup = false);
+ explicit CNetAddr(const char *pszIp, bool fAllowLookup = false);
+ explicit CNetAddr(const std::string &strIp, bool fAllowLookup = false);
void Init();
void SetIP(const CNetAddr& ip);
bool IsIPv4() const; // IPv4 mapped address (::FFFF:0:0/96, 0.0.0.0/0)
@@ -91,10 +91,10 @@ class CService : public CNetAddr
CService(const CNetAddr& ip, unsigned short port);
CService(const struct in_addr& ipv4Addr, unsigned short port);
CService(const struct sockaddr_in& addr);
- CService(const char *pszIp, int port, bool fAllowLookup = false);
- CService(const char *pszIpPort, bool fAllowLookup = false);
- CService(const std::string& strIp, int port, bool fAllowLookup = false);
- CService(const std::string& strIpPort, bool fAllowLookup = false);
+ explicit CService(const char *pszIpPort, int portDefault, bool fAllowLookup = false);
+ explicit CService(const char *pszIpPort, bool fAllowLookup = false);
+ explicit CService(const std::string& strIpPort, int portDefault, bool fAllowLookup = false);
+ explicit CService(const std::string& strIpPort, bool fAllowLookup = false);
void Init();
void SetPort(unsigned short portIn);
unsigned short GetPort() const;