Prefer TrimPrefix() over Left() + LeftChomp()

This commit is contained in:
J-P Nurmi
2015-08-14 12:29:42 +02:00
parent 2d5aa8da59
commit 475acd8f00
5 changed files with 7 additions and 16 deletions

View File

@@ -1055,9 +1055,8 @@ bool CIRCNetwork::AddServer(const CString& sName) {
CString sHost = sLine.Token(0);
CString sPort = sLine.Token(1);
if (sPort.Left(1) == "+") {
if (sPort.TrimPrefix("+")) {
bSSL = true;
sPort.LeftChomp();
}
unsigned short uPort = sPort.ToUShort();