]> git.lizzy.rs Git - minetest.git/blobdiff - src/staticobject.cpp
jthread remove locks that aren't absolutely required
[minetest.git] / src / staticobject.cpp
index 00d846ba5bd7bd8356a374e65411521c10745a5b..973257fcfa1482853ebec4051224780a37da38e1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Minetest
-Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
+Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -58,18 +58,18 @@ void StaticObjectList::serialize(std::ostream &os)
        u16 count = m_stored.size() + m_active.size();
        writeU16((u8*)buf, count);
        os.write(buf, 2);
-       for(core::list<StaticObject>::Iterator
+       for(std::list<StaticObject>::iterator
                        i = m_stored.begin();
-                       i != m_stored.end(); i++)
+                       i != m_stored.end(); ++i)
        {
                StaticObject &s_obj = *i;
                s_obj.serialize(os);
        }
-       for(core::map<u16, StaticObject>::Iterator
-                       i = m_active.getIterator();
-                       i.atEnd()==false; i++)
+       for(std::map<u16, StaticObject>::iterator
+                       i = m_active.begin();
+                       i != m_active.end(); ++i)
        {
-               StaticObject s_obj = i.getNode()->getValue();
+               StaticObject s_obj = i->second;
                s_obj.serialize(os);
        }
 }