aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-12 21:34:50 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-12 21:34:50 +0100
commit8897847aa556384d0a0d7bbaccd9241e0f4470d1 (patch)
treee4e92060b00b36b2fe187188ee4bec1f71776258
parentc4641079e8dada86a5f4846ef8027f88c11c7294 (diff)
remove CssRule reference counting
-rw-r--r--src/css.cc4
-rw-r--r--src/css.hh3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/css.cc b/src/css.cc
index 6f4243f7..2da2f495 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -157,7 +157,6 @@ void CssSimpleSelector::print () {
}
CssRule::CssRule (CssSelector *selector, CssPropertyList *props) {
- refCount = 0;
this->selector = selector;
this->selector->ref ();
this->props = props;
@@ -191,7 +190,7 @@ CssStyleSheet::CssStyleSheet () {
CssStyleSheet::~CssStyleSheet () {
for (int i = 0; i < ntags; i++) {
for (int j = 0; j < elementTable[i]->size (); j++)
- elementTable[i]->get (j)->unref ();
+ delete elementTable[i]->get (j);
delete elementTable[i];
}
@@ -232,7 +231,6 @@ void CssStyleSheet::addRule (CssRule *rule) {
if (ruleList) {
ruleList->increase ();
*ruleList->getRef (ruleList->size() - 1) = rule;
- rule->ref ();
}
}
diff --git a/src/css.hh b/src/css.hh
index f3d87702..e4e7f3de 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -255,7 +255,6 @@ class CssSelector {
*/
class CssRule {
private:
- int refCount;
CssPropertyList *props;
public:
@@ -265,8 +264,6 @@ class CssRule {
~CssRule ();
void apply (CssPropertyList *props, Doctree *docTree);
- inline void ref () { refCount++; }
- inline void unref () { if(--refCount == 0) delete this; }
void print ();
};