Prefer Contains() over find() != npos

This commit is contained in:
J-P Nurmi
2015-08-14 12:46:51 +02:00
parent 6a6fbab342
commit 2417ca68a8
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -1220,7 +1220,7 @@ bool CUser::DelCTCPReply(const CString& sCTCP) {
}
bool CUser::SetStatusPrefix(const CString& s) {
if ((!s.empty()) && (s.length() < 6) && (s.find(' ') == CString::npos)) {
if ((!s.empty()) && (s.length() < 6) && (!s.Contains(" "))) {
m_sStatusPrefix = (s.empty()) ? "*" : s;
return true;
}