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)
This commit is contained in:
Wladimir J. van der Laan 2015-06-01 09:53:35 +02:00
commit e9d0d252fc
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
2 changed files with 4 additions and 6 deletions

View File

@ -1363,7 +1363,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) || FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
FindNode(addrConnect.ToStringIPPort())) FindNode(addrConnect.ToStringIPPort()))
return false; return false;
} else if (FindNode(pszDest)) } else if (FindNode(std::string(pszDest)))
return false; return false;
CNode* pnode = ConnectNode(addrConnect, pszDest); CNode* pnode = ConnectNode(addrConnect, pszDest);
@ -1385,7 +1385,7 @@ void ThreadMessageHandler()
{ {
boost::mutex condition_mutex; boost::mutex condition_mutex;
boost::unique_lock<boost::mutex> lock(condition_mutex); boost::unique_lock<boost::mutex> lock(condition_mutex);
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL); SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
while (true) while (true)
{ {

View File

@ -35,8 +35,6 @@
#define MSG_NOSIGNAL 0 #define MSG_NOSIGNAL 0
#endif #endif
using namespace std;
// Settings // Settings
static proxyType proxyInfo[NET_MAX]; static proxyType proxyInfo[NET_MAX];
static proxyType nameProxy; 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) bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
{ {
string strDest; std::string strDest;
int port = portDefault; int port = portDefault;
if (outProxyConnectionFailed) if (outProxyConnectionFailed)
*outProxyConnectionFailed = false; *outProxyConnectionFailed = false;
SplitHostPort(string(pszDest), port, strDest); SplitHostPort(std::string(pszDest), port, strDest);
proxyType nameProxy; proxyType nameProxy;
GetNameProxy(nameProxy); GetNameProxy(nameProxy);