mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add CTable::empty
It shouldn't make any real difference (especially not for std::vector), but "empty()" is better than using "size() == 0". Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -390,7 +390,7 @@ bool CTable::SetCell(const CString& sColumn, const CString& sValue, unsigned int
|
||||
bool CTable::GetLine(unsigned int uIdx, CString& sLine) const {
|
||||
stringstream ssRet;
|
||||
|
||||
if (!size()) {
|
||||
if (empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
3
Utils.h
3
Utils.h
@@ -195,6 +195,9 @@ public:
|
||||
|
||||
/// @return The number of rows in this table, not counting the header.
|
||||
using vector<vector<CString> >::size;
|
||||
|
||||
/// @return True if this table doesn't contain any rows.
|
||||
using vector<vector<CString> >::empty;
|
||||
private:
|
||||
unsigned int GetColumnIndex(const CString& sName) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user