Skip to content

Commit d1af89e

Browse files
author
Philip Kaufmann
committed
use const reference as param in ConnectThroughProxy/Socks5
- also ensure code style conformance by replacing bool static with static bool
1 parent 18d2832 commit d1af89e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/netbase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct ProxyCredentials
293293
};
294294

295295
/** Connect using SOCKS5 (as described in RFC1928) */
296-
bool static Socks5(string strDest, int port, const ProxyCredentials *auth, SOCKET& hSocket)
296+
static bool Socks5(const std::string& strDest, int port, const ProxyCredentials *auth, SOCKET& hSocket)
297297
{
298298
LogPrintf("SOCKS5 connecting %s\n", strDest);
299299
if (strDest.size() > 255) {
@@ -558,7 +558,7 @@ bool IsProxy(const CNetAddr &addr) {
558558
return false;
559559
}
560560

561-
static bool ConnectThroughProxy(const proxyType &proxy, const std::string strDest, int port, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
561+
static bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
562562
{
563563
SOCKET hSocket = INVALID_SOCKET;
564564
// first connect to proxy server

0 commit comments

Comments
 (0)