[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kjs
From: Maks Orlovich <maksim () kde ! org>
Date: 2010-05-01 17:56:49
Message-ID: 20100501180025.8A94FAC8AA () svn ! kde ! org
[Download RAW message or body]
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<ListImp *>(_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();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic