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 timerUpdate calls

This commit is contained in:
Loic Blot 2015-02-17 15:04:08 +01:00
parent 24315db6ef
commit 3c91ad8fc2
3 changed files with 9 additions and 10 deletions

View file

@ -1421,7 +1421,7 @@ bool Map::getDayNightDiff(v3s16 blockpos)
Updates usage timers
*/
void Map::timerUpdate(float dtime, float unload_timeout,
std::list<v3s16> *unloaded_blocks)
std::vector<v3s16> *unloaded_blocks)
{
bool save_before_unloading = (mapType() == MAPTYPE_SERVER);
@ -1435,8 +1435,7 @@ void Map::timerUpdate(float dtime, float unload_timeout,
beginSave();
for(std::map<v2s16, MapSector*>::iterator si = m_sectors.begin();
si != m_sectors.end(); ++si)
{
si != m_sectors.end(); ++si) {
MapSector *sector = si->second;
bool all_blocks_deleted = true;
@ -1506,7 +1505,7 @@ void Map::timerUpdate(float dtime, float unload_timeout,
}
}
void Map::unloadUnreferencedBlocks(std::list<v3s16> *unloaded_blocks)
void Map::unloadUnreferencedBlocks(std::vector<v3s16> *unloaded_blocks)
{
timerUpdate(0.0, -1.0, unloaded_blocks);
}