summaryrefslogtreecommitdiff
path: root/src/context
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-10-02 05:52:51 +0000
committerTim King <taking@cs.nyu.edu>2010-10-02 05:52:51 +0000
commit37c20e30239e8ce86e9fc7106afcf5a7b896e7c3 (patch)
treeee78b955ccfe0240d878945e7eb2baaeb5a9ed6b /src/context
parent02c2038dca9ce3e09cac66ed3bd6f8e2832ff74b (diff)
branches/arith-indexed-variables merged into the main trunk.
Diffstat (limited to 'src/context')
-rw-r--r--src/context/cdmap.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h
index d9cc5b1a3..b7fc5dcc6 100644
--- a/src/context/cdmap.h
+++ b/src/context/cdmap.h
@@ -340,19 +340,17 @@ public:
}
void clear() throw(AssertionException) {
- Debug("gc") << "clearing cdmap " << this << std::endl;
-
- Debug("gc") << "cdmap " << this << " cleared, emptying trash" << std::endl;
+ Debug("gc") << "clearing cdmap " << this << ", emptying trash" << std::endl;
emptyTrash();
Debug("gc") << "done emptying trash for " << this << std::endl;
- for(typename table_type::iterator i = d_map.begin();
- i != d_map.end();
- ++i) {
+ for(Element* i = d_first; i != NULL;) {
// mark it as being a destruction (short-circuit restore())
- (*i).second->d_map = NULL;
- if(!(*i).second->d_noTrash) {
- (*i).second->deleteSelf();
+ Element* thisOne = i;
+ i = i->next();
+ thisOne->d_map = NULL;
+ if(!thisOne->d_noTrash) {
+ thisOne->deleteSelf();
}
}
d_map.clear();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback