diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
commit | c390604bc1343705ee17d6466da8dc53b5fa3b0e (patch) | |
tree | cbf9db66aae0fd8a85c88b0b1ef5ae9aea4d20ea /src/MapManager.cpp | |
parent | Merge pull request #2036 from cuberite/sign-metamirror (diff) | |
parent | Improved maps (diff) | |
download | cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.gz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.bz2 cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.lz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.xz cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.zst cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.zip |
Diffstat (limited to 'src/MapManager.cpp')
-rw-r--r-- | src/MapManager.cpp | 22 |
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); |