diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/sim_object.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/sim_object.cc b/sim/sim_object.cc index b3ac2c7a4..c55021e41 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -182,11 +182,11 @@ SimObject::printAllExtraOutput(ostream &os) void SimObject::serializeAll(ostream &os) { - SimObjectList::iterator i = simObjectList.begin(); - SimObjectList::iterator end = simObjectList.end(); + SimObjectList::reverse_iterator ri = simObjectList.rbegin(); + SimObjectList::reverse_iterator rend = simObjectList.rend(); - for (; i != end; ++i) { - SimObject *obj = *i; + for (; ri != rend; ++ri) { + SimObject *obj = *ri; obj->nameOut(os); obj->serialize(os); } |