aboutsummaryrefslogtreecommitdiffstats
path: root/src/gc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gc.cpp')
-rw-r--r--src/gc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gc.cpp b/src/gc.cpp
index 59036df..d07367d 100644
--- a/src/gc.cpp
+++ b/src/gc.cpp
@@ -66,8 +66,8 @@ mark(const Object* obj)
if (obj->tag() != T_UNKNOWN) {
const ATuple* tup = ((const AST*)obj)->to_tuple();
if (tup)
- FOREACHP(ATuple::const_iterator, i, tup)
- mark(*i);
+ for (const auto& i : *tup)
+ mark(i);
}
}
@@ -76,8 +76,8 @@ GC::collect(const Roots& roots)
{
//const size_t oldSize = _heap.size();
- for (Roots::const_iterator i = roots.begin(); i != roots.end(); ++i)
- mark(*i);
+ for (auto r : roots)
+ mark(r);
for (Heap::iterator i = _heap.begin(); i != _heap.end();) {
Heap::iterator next = i;