Remove some pointless if statements

This commit is contained in:
Kyle Fuller
2011-03-27 23:21:28 +01:00
parent e62ec2dc82
commit d735e9d881
7 changed files with 10 additions and 48 deletions

View File

@@ -18,15 +18,7 @@ CServer::CServer(const CString& sName, unsigned short uPort, const CString& sPas
CServer::~CServer() {}
bool CServer::IsValidHostName(const CString& sHostName) {
if (sHostName.empty()) {
return false;
}
if (sHostName.find(' ') != CString::npos) {
return false;
}
return true;
return (!sHostName.empty() && (sHostName.find(' ') == CString::npos));
}
const CString& CServer::GetName() const { return m_sName; }