summaryrefslogtreecommitdiffstats
path: root/vm/alloc/Visit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/alloc/Visit.cpp')
-rw-r--r--vm/alloc/Visit.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm/alloc/Visit.cpp b/vm/alloc/Visit.cpp
index a869418af..7eaff07ac 100644
--- a/vm/alloc/Visit.cpp
+++ b/vm/alloc/Visit.cpp
@@ -70,10 +70,9 @@ static void visitIndirectRefTable(RootVisitor *visitor, IndirectRefTable *table,
{
assert(visitor != NULL);
assert(table != NULL);
- Object **entry = table->table;
- int numEntries = table->capacity();
- for (int i = 0; i < numEntries; ++i) {
- (*visitor)(&entry[i], threadId, type, arg);
+ typedef IndirectRefTable::iterator It; // TODO: C++0x auto
+ for (It it = table->begin(), end = table->end(); it != end; ++it) {
+ (*visitor)(*it, threadId, type, arg);
}
}