Increment iterators before erasing them rather than after

Originally committed to SVN as r6515.
This commit is contained in:
Thomas Goyne 2012-02-25 02:58:04 +00:00
parent 45da185a43
commit 451b262672

View file

@ -224,9 +224,9 @@ public:
cur_size += (ba.size() - std::count(ba.begin(), ba.end(), (BlockT*)0)) * block_size;
}
// Hit max, clear all remaining blocks
for (; it != age.end(); ++it)
for (; it != age.end();)
{
KillMacroBlock(**it);
KillMacroBlock(**it++);
}
}