summaryrefslogtreecommitdiffstats
path: root/src/MapManager.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-30 16:50:15 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-14 22:46:30 +0200
commit8656e149c8820272a882406912790f0075ed5f28 (patch)
treeb4f89f69dfb026f76862046637fd99162a49d3c9 /src/MapManager.cpp
parentMerge pull request #2352 from mmdk95/master (diff)
downloadcuberite-8656e149c8820272a882406912790f0075ed5f28.tar
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.gz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.bz2
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.lz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.xz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.zst
cuberite-8656e149c8820272a882406912790f0075ed5f28.zip
Diffstat (limited to '')
-rw-r--r--src/MapManager.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/MapManager.cpp b/src/MapManager.cpp
index 41b0d9e34..2729e67dd 100644
--- a/src/MapManager.cpp
+++ b/src/MapManager.cpp
@@ -42,18 +42,13 @@ bool cMapManager::DoWithMap(UInt32 a_ID, cMapCallback & a_Callback)
-bool cMapManager::ForEachMap(cMapCallback & a_Callback)
+void cMapManager::TickMaps()
{
cCSLock Lock(m_CS);
- for (cMapList::iterator itr = m_MapData.begin(); itr != m_MapData.end(); ++itr)
+ for (auto & Map : m_MapData)
{
- cMap * Map = &(*itr);
- if (a_Callback.Item(Map))
- {
- return false;
- }
- } // for itr - m_MapData[]
- return true;
+ Map.Tick();
+ }
}
@@ -97,15 +92,6 @@ cMap * cMapManager::CreateMap(int a_CenterX, int a_CenterY, unsigned int a_Scale
-size_t cMapManager::GetNumMaps(void) const
-{
- return m_MapData.size();
-}
-
-
-
-
-
void cMapManager::LoadMapData(void)
{
cCSLock Lock(m_CS);