diff --git a/ClientCommand.cpp b/ClientCommand.cpp index 8ff3ff45..99050807 100644 --- a/ClientCommand.cpp +++ b/ClientCommand.cpp @@ -335,9 +335,7 @@ void CClient::UserCommand(CString& sLine) { return; } - const vector& vServers = m_pUser->GetServers(); - - if (vServers.size() <= 0) { + if (!m_pUser->HasServers()) { PutStatus("You don't have any servers added."); return; } diff --git a/User.h b/User.h index efc5ea56..9ce36da4 100644 --- a/User.h +++ b/User.h @@ -213,7 +213,7 @@ public: unsigned int GetBufferCount() const; bool KeepBuffer() const; bool IsBeingDeleted() const { return m_bBeingDeleted; } - bool HasServers() const { return m_vServers.size() > 0; } + bool HasServers() const { return !m_vServers.empty(); } float GetTimezoneOffset() const { return m_fTimezoneOffset; } unsigned long long BytesRead() const { return m_uBytesRead; } unsigned long long BytesWritten() const { return m_uBytesWritten; }