1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap::listAllLoadedBlocks and their database backends.

This adds a speedup on database migration and /clearobjects command
This commit is contained in:
Loic Blot 2015-02-17 14:30:32 +01:00
parent c58d49977d
commit 718bcafd51
13 changed files with 43 additions and 51 deletions

View file

@ -3070,7 +3070,7 @@ void ServerMap::save(ModifiedState save_level)
}
}
void ServerMap::listAllLoadableBlocks(std::list<v3s16> &dst)
void ServerMap::listAllLoadableBlocks(std::vector<v3s16> &dst)
{
if(loadFromFolders()){
errorstream<<"Map::listAllLoadableBlocks(): Result will be missing "
@ -3079,7 +3079,7 @@ void ServerMap::listAllLoadableBlocks(std::list<v3s16> &dst)
dbase->listAllLoadableBlocks(dst);
}
void ServerMap::listAllLoadedBlocks(std::list<v3s16> &dst)
void ServerMap::listAllLoadedBlocks(std::vector<v3s16> &dst)
{
for(std::map<v2s16, MapSector*>::iterator si = m_sectors.begin();
si != m_sectors.end(); ++si)