aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-06-01 09:53:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-06-01 09:53:45 +0200
commite9d0d252fc57119766f5d7b58715451dd42b1ce6 (patch)
treef83a0d441d3bfb37f7460e5e69863dbce74512e3
parent42746b0476ba4d8419227809a0001ad276b7ce51 (diff)
parentd6922aad2c054667efede271c4198247edd6f6ad (diff)
Merge pull request #6208
d6922aa [net, trivial] remove using namespace std pollution in netbase.cpp (Philip Kaufmann) 49b2292 [net, trivial] explicitly use std::string for FindNode (Philip Kaufmann)
-rw-r--r--src/net.cpp4
-rw-r--r--src/netbase.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 6849d79263..3908be6824 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1363,7 +1363,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
FindNode(addrConnect.ToStringIPPort()))
return false;
- } else if (FindNode(pszDest))
+ } else if (FindNode(std::string(pszDest)))
return false;
CNode* pnode = ConnectNode(addrConnect, pszDest);
@@ -1385,7 +1385,7 @@ void ThreadMessageHandler()
{
boost::mutex condition_mutex;
boost::unique_lock<boost::mutex> lock(condition_mutex);
-
+
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
while (true)
{
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 41cc18d3cd..e3cb4e706f 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -35,8 +35,6 @@
#define MSG_NOSIGNAL 0
#endif
-using namespace std;
-
// Settings
static proxyType proxyInfo[NET_MAX];
static proxyType nameProxy;
@@ -597,13 +595,13 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, b
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
{
- string strDest;
+ std::string strDest;
int port = portDefault;
if (outProxyConnectionFailed)
*outProxyConnectionFailed = false;
- SplitHostPort(string(pszDest), port, strDest);
+ SplitHostPort(std::string(pszDest), port, strDest);
proxyType nameProxy;
GetNameProxy(nameProxy);