diff --git a/Utils.cpp b/Utils.cpp index a89525ad..3ced88cb 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -543,6 +543,11 @@ unsigned int CTable::GetColumnWidth(unsigned int uIdx) const { return it->second; } +void CTable::Clear() { + clear(); + m_vsHeaders.clear(); + m_msuWidths.clear(); +} #ifdef HAVE_LIBSSL CBlowfish::CBlowfish(const CString & sPassword, int iEncrypt, const CString & sIvec) { diff --git a/Utils.h b/Utils.h index 3aa89e98..eedca532 100644 --- a/Utils.h +++ b/Utils.h @@ -199,7 +199,7 @@ protected: }; -class CTable : public vector > { +class CTable : protected vector > { public: CTable() {} virtual ~CTable() {} @@ -210,6 +210,9 @@ public: bool GetLine(unsigned int uIdx, CString& sLine) const; unsigned int GetColumnWidth(unsigned int uIdx) const; + + void Clear(); + using vector >::size; private: unsigned int GetColumnIndex(const CString& sName) const;