From cd684497c28a93e1bca4fbe889eef2d6d5c59289 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 4 Mar 2015 17:18:57 +0100 Subject: Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues() --- src/staticobject.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/staticobject.cpp') diff --git a/src/staticobject.cpp b/src/staticobject.cpp index 16d98605b..2e7d45a47 100644 --- a/src/staticobject.cpp +++ b/src/staticobject.cpp @@ -47,10 +47,9 @@ void StaticObjectList::serialize(std::ostream &os) // count u16 count = m_stored.size() + m_active.size(); writeU16(os, count); - for(std::list::iterator + for(std::vector::iterator i = m_stored.begin(); - i != m_stored.end(); ++i) - { + i != m_stored.end(); ++i) { StaticObject &s_obj = *i; s_obj.serialize(os); } @@ -68,8 +67,7 @@ void StaticObjectList::deSerialize(std::istream &is) u8 version = readU8(is); // count u16 count = readU16(is); - for(u16 i=0; i