cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,12 +30,28 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxHtmlTagsCache
|
// wxHtmlTagsCache
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
struct wxHtmlCacheItem
|
||||||
|
{
|
||||||
|
// this is "pos" value passed to wxHtmlTag's constructor.
|
||||||
|
// it is position of '<' character of the tag
|
||||||
|
int Key;
|
||||||
|
|
||||||
|
// end positions for the tag:
|
||||||
|
// end1 is '<' of ending tag,
|
||||||
|
// end2 is '>' or both are
|
||||||
|
// -1 if there is no ending tag for this one...
|
||||||
|
// or -2 if this is ending tag </...>
|
||||||
|
int End1, End2;
|
||||||
|
|
||||||
|
// name of this tag
|
||||||
|
wxChar *Name;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxHtmlTagsCache,wxObject)
|
IMPLEMENT_CLASS(wxHtmlTagsCache,wxObject)
|
||||||
|
|
||||||
#define CACHE_INCREMENT 64
|
#define CACHE_INCREMENT 64
|
||||||
@@ -57,7 +73,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
|
|||||||
if (src[pos] == wxT('<')) // tag found:
|
if (src[pos] == wxT('<')) // tag found:
|
||||||
{
|
{
|
||||||
if (m_CacheSize % CACHE_INCREMENT == 0)
|
if (m_CacheSize % CACHE_INCREMENT == 0)
|
||||||
m_Cache = (sCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(sCacheItem));
|
m_Cache = (wxHtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wxHtmlCacheItem));
|
||||||
tg = m_CacheSize++;
|
tg = m_CacheSize++;
|
||||||
m_Cache[tg].Key = stpos = pos++;
|
m_Cache[tg].Key = stpos = pos++;
|
||||||
dummy[0] = 0; i = 0;
|
dummy[0] = 0; i = 0;
|
||||||
|
Reference in New Issue
Block a user