aboutsummaryrefslogtreecommitdiff
path: root/src/staticobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/staticobject.cpp')
-rw-r--r--src/staticobject.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/staticobject.cpp b/src/staticobject.cpp
index d656b6221..6ad2e1f94 100644
--- a/src/staticobject.cpp
+++ b/src/staticobject.cpp
@@ -59,17 +59,12 @@ void StaticObjectList::serialize(std::ostream &os)
}
writeU16(os, count);
- for(std::vector<StaticObject>::iterator
- i = m_stored.begin();
- i != m_stored.end(); ++i) {
- StaticObject &s_obj = *i;
+ for (StaticObject &s_obj : m_stored) {
s_obj.serialize(os);
}
- for(std::map<u16, StaticObject>::iterator
- i = m_active.begin();
- i != m_active.end(); ++i)
- {
- StaticObject s_obj = i->second;
+
+ for (auto &i : m_active) {
+ StaticObject s_obj = i.second;
s_obj.serialize(os);
}
}