From: Nathan Binkert Date: Fri, 20 Oct 2006 06:35:59 +0000 (-0700) Subject: initialize end, clean up loop X-Git-Tag: m5_2.0_beta2~83^2~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b246a0567193b05d8257fce8c43610ce5b8c253;p=gem5.git initialize end, clean up loop --HG-- extra : convert_revision : e1c107f0c0fd5d535acd2d6c43571a5df57c9ed3 --- diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc index fa6d5ddfb..fe8094b88 100644 --- a/src/mem/page_table.cc +++ b/src/mem/page_table.cc @@ -170,11 +170,14 @@ PageTable::serialize(std::ostream &os) int count = 0; - m5::hash_map::iterator iter; - m5::hash_map::iterator end; - for (iter = pTable.begin(); iter != end; ++iter,++count) { - paramOut(os, csprintf("ptable.entry%dvaddr", count),iter->first); - paramOut(os, csprintf("ptable.entry%dpaddr", count),iter->second); + m5::hash_map::iterator iter = pTable.begin(); + m5::hash_map::iterator end = pTable.end(); + while (iter != end) { + paramOut(os, csprintf("ptable.entry%dvaddr", count), iter->first); + paramOut(os, csprintf("ptable.entry%dpaddr", count), iter->second); + + ++iter; + ++count; } assert(count == pTable.size()); }