SVN commit 1121566 by orlovich: Remove redundant field. Liveness always implies it > 0 these days. (as its strictly > refcount) M +2 -6 list.cpp M +1 -3 list.h --- trunk/KDE/kdelibs/kjs/list.cpp #1121565:1121566 @@ -124,18 +124,14 @@ for (int i = 0; i < poolSize && seen < used; i++) { if (pool[i].state == usedInPool) { seen++; - if (pool[i].valueRefCount > 0) { pool[i].markValues(); } } - } for (HeapListImp *l = heapList; l; l = l->nextInHeapList) { - if (l->valueRefCount > 0) { l->markValues(); } } -} static inline ListImp *allocateListImp() @@ -167,7 +163,6 @@ ListImp *imp = static_cast(_impBase); imp->size = 0; imp->refCount = 1; - imp->valueRefCount = 1; imp->capacity = 0; imp->overflow = 0; @@ -325,10 +320,11 @@ { ListImpBase *bImpBase = b._impBase; ++bImpBase->refCount; - ++bImpBase->valueRefCount; deref(); _impBase = bImpBase; return *this; } } // namespace KJS + +// kate: indent-width 4; replace-tabs on; tab-width 4; space-indent on; --- trunk/KDE/kdelibs/kjs/list.h #1121565:1121566 @@ -30,7 +30,6 @@ struct ListImpBase { int size; int refCount; - int valueRefCount; // FIXME: Get rid of this. }; class ListIterator; @@ -52,7 +51,6 @@ List(const List &b) : _impBase(b._impBase) { ++_impBase->refCount; - ++_impBase->valueRefCount; } List &operator=(const List &); @@ -131,7 +129,7 @@ private: ListImpBase *_impBase; - void deref() { --_impBase->valueRefCount; if (--_impBase->refCount == 0) release(); } + void deref() { if (--_impBase->refCount == 0) release(); } void release(); void markValues();