forked from Mirrorlandia_minetest/minetest
Use unordered_map instead of map for MapSectors
This commit is contained in:
parent
367a2d4b29
commit
e16a470d59
@ -102,7 +102,7 @@ MapSector * Map::getSectorNoGenerateNoLock(v2s16 p)
|
|||||||
return sector;
|
return sector;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<v2s16, MapSector*>::iterator n = m_sectors.find(p);
|
auto n = m_sectors.find(p);
|
||||||
|
|
||||||
if (n == m_sectors.end())
|
if (n == m_sectors.end())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -266,7 +266,7 @@ protected:
|
|||||||
|
|
||||||
std::set<MapEventReceiver*> m_event_receivers;
|
std::set<MapEventReceiver*> m_event_receivers;
|
||||||
|
|
||||||
std::map<v2s16, MapSector*> m_sectors;
|
std::unordered_map<v2s16, MapSector*> m_sectors;
|
||||||
|
|
||||||
// Be sure to set this to NULL when the cached sector is deleted
|
// Be sure to set this to NULL when the cached sector is deleted
|
||||||
MapSector *m_sector_cache = nullptr;
|
MapSector *m_sector_cache = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user