Prefer StartsWith(s) over Left(n) == s

This commit is contained in:
J-P Nurmi
2015-08-14 12:34:27 +02:00
parent 52395fad5e
commit 4995e7517e
10 changed files with 28 additions and 28 deletions

View File

@@ -69,7 +69,7 @@ unsigned int CSockManager::GetAnonConnectionCount(const CString &sIP) const {
Csock *pSock = *it;
// Logged in CClients have "USR::<username>" as their sockname
if (pSock->GetType() == Csock::INBOUND && pSock->GetRemoteIP() == sIP
&& pSock->GetSockName().Left(5) != "USR::") {
&& !pSock->GetSockName().StartsWith("USR::")) {
ret++;
}
}