Use empty() instead of size() == 0 where appropriate

This was found by cppcheck (cppcheck.sf.net).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1761 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-02-18 12:39:41 +00:00
parent 57fe412a35
commit 291ad47907
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -733,7 +733,7 @@ CChan* CUser::FindChan(const CString& sName) const {
void CUser::JoinChans() {
// Avoid divsion by zero, it's bad!
if (m_vChans.size() == 0)
if (m_vChans.empty())
return;
// We start at a random offset into the channel list so that if your
@@ -962,7 +962,7 @@ CString CUser::GetLocalIP() {
return pIRCSock->GetLocalIP();
}
if (m_vClients.size()) {
if (!m_vClients.empty()) {
return m_vClients[0]->GetLocalIP();
}
@@ -1117,7 +1117,7 @@ CString CUser::GetCurNick() const {
return pIRCSock->GetNick();
}
if (m_vClients.size()) {
if (!m_vClients.empty()) {
return m_vClients[0]->GetNick();
}