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:
1 parent
e7fc8fa907
commit
2ccafaf516
2 files changed
+4
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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