mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Replace std::list by std::vector into ClientMap::updateDrawList, Map::timerUpdate and ServerMap::save().
This will speedup the loop reading into those functions
This commit is contained in:
@@ -247,7 +247,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
|
||||
continue;
|
||||
}
|
||||
|
||||
std::list< MapBlock * > sectorblocks;
|
||||
MapBlockVect sectorblocks;
|
||||
sector->getBlocks(sectorblocks);
|
||||
|
||||
/*
|
||||
@@ -256,8 +256,8 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
|
||||
|
||||
u32 sector_blocks_drawn = 0;
|
||||
|
||||
std::list< MapBlock * >::iterator i;
|
||||
for(i=sectorblocks.begin(); i!=sectorblocks.end(); i++)
|
||||
for(MapBlockVect::iterator i = sectorblocks.begin();
|
||||
i != sectorblocks.end(); i++)
|
||||
{
|
||||
MapBlock *block = *i;
|
||||
|
||||
|
Reference in New Issue
Block a user