aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:18:57 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:22:37 +0100
commitcd684497c28a93e1bca4fbe889eef2d6d5c59289 (patch)
tree20fd3eb2e9e3605803204140bfe2352018049c0d /src/environment.cpp
parent06f328207fa0a3e606992d3569b061b335eb0f48 (diff)
downloadminetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.tar.gz
minetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.tar.bz2
minetest-cd684497c28a93e1bca4fbe889eef2d6d5c59289.zip
Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues()
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index 0a3d36019..9daa9e042 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -1675,12 +1675,13 @@ void ServerEnvironment::activateObjects(MapBlock *block, u32 dtime_s)
// Ignore if no stored objects (to not set changed flag)
if(block->m_static_objects.m_stored.empty())
return;
+
verbosestream<<"ServerEnvironment::activateObjects(): "
<<"activating objects of block "<<PP(block->getPos())
<<" ("<<block->m_static_objects.m_stored.size()
<<" objects)"<<std::endl;
bool large_amount = (block->m_static_objects.m_stored.size() > g_settings->getU16("max_objects_per_block"));
- if(large_amount){
+ if (large_amount) {
errorstream<<"suspiciously large amount of objects detected: "
<<block->m_static_objects.m_stored.size()<<" in "
<<PP(block->getPos())
@@ -1695,7 +1696,7 @@ void ServerEnvironment::activateObjects(MapBlock *block, u32 dtime_s)
// Activate stored objects
std::vector<StaticObject> new_stored;
- for(std::list<StaticObject>::iterator
+ for (std::vector<StaticObject>::iterator
i = block->m_static_objects.m_stored.begin();
i != block->m_static_objects.m_stored.end(); ++i) {
StaticObject &s_obj = *i;