diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-25 18:00:39 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-25 18:00:39 +0100 |
commit | d042582057401617924bece71783aa57bf9d345d (patch) | |
tree | 070012b0c19771700dcd695c3b18a0891a4a9565 /src/css.hh | |
parent | 37e9c1e7d1dbf66ee78189c2775922f8360c0e60 (diff) |
allocate/deallocate CssSimpleSelector properly
Diffstat (limited to 'src/css.hh')
-rw-r--r-- | src/css.hh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -203,8 +203,10 @@ class CssSimpleSelector { }; int element; - const char *klass, *pseudo, *id; + char *klass, *pseudo, *id; + CssSimpleSelector (); + ~CssSimpleSelector (); bool match (const DoctreeNode *node); void print (); }; @@ -225,7 +227,7 @@ class CssSelector { struct CombinatorAndSelector { int notMatchingBefore; // used for optimizing CSS selector matching Combinator combinator; - CssSimpleSelector selector; + CssSimpleSelector *selector; }; int refCount; @@ -236,7 +238,7 @@ class CssSelector { ~CssSelector (); void addSimpleSelector (Combinator c); inline CssSimpleSelector *top () { - return &selectorList->getRef (selectorList->size () - 1)->selector; + return selectorList->getRef (selectorList->size () - 1)->selector; }; inline int size () { return selectorList->size (); }; bool match (Doctree *dt, const DoctreeNode *node); |