mirror of
https://github.com/znc/znc.git
synced 2026-05-02 11:32:29 +02:00
Remove some pointless if statements
This commit is contained in:
10
Server.cpp
10
Server.cpp
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user