use wxVector<T> instead of homegrown growing array in wxHtmlTagsCache

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-08-21 16:10:28 +00:00
parent 4e57034053
commit 4fe7567d90
2 changed files with 45 additions and 33 deletions

View File

@@ -25,21 +25,22 @@ class WXDLLIMPEXP_FWD_HTML wxHtmlEntitiesParser;
// - internal wxHTML class, do not use!
//-----------------------------------------------------------------------------
struct wxHtmlCacheItem;
class wxHtmlTagsCacheData;
class WXDLLIMPEXP_HTML wxHtmlTagsCache : public wxObject
{
DECLARE_DYNAMIC_CLASS(wxHtmlTagsCache)
private:
wxHtmlCacheItem *m_Cache;
int m_CacheSize;
int m_CachePos;
wxHtmlTagsCacheData *m_Cache;
size_t m_CachePos;
wxHtmlTagsCacheData& Cache() { return *m_Cache; }
public:
wxHtmlTagsCache() : wxObject() {m_CacheSize = 0; m_Cache = NULL;}
wxHtmlTagsCache() {m_Cache = NULL;}
wxHtmlTagsCache(const wxString& source);
virtual ~wxHtmlTagsCache() {free(m_Cache);}
virtual ~wxHtmlTagsCache();
// Finds parameters for tag starting at at and fills the variables
void QueryTag(int at, int* end1, int* end2);