summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-21 16:51:43 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-22 00:21:01 +0100
commit53ae358d8c5db448e7f4b6deac66b3d9e42e59ee (patch)
tree3a3224fdb45a684f9db573e1dedc5a25e5e5d8cb /src/ChunkMap.h
parentunique_ptr<cChunkMap> to plain member (diff)
downloadcuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar.gz
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar.bz2
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar.lz
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar.xz
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.tar.zst
cuberite-53ae358d8c5db448e7f4b6deac66b3d9e42e59ee.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/ChunkMap.h b/src/ChunkMap.h
index 38f03255a..e40a5d59d 100644
--- a/src/ChunkMap.h
+++ b/src/ChunkMap.h
@@ -421,27 +421,13 @@ private:
}
};
- struct ChunkCoordinate
- {
- struct Comparer
- {
- bool operator() (const ChunkCoordinate & a_Lhs, const ChunkCoordinate & a_Rhs) const
- {
- return ((a_Lhs.ChunkX == a_Rhs.ChunkX) ? (a_Lhs.ChunkZ < a_Rhs.ChunkZ) : (a_Lhs.ChunkX < a_Rhs.ChunkX));
- }
- };
-
- int ChunkX;
- int ChunkZ;
- };
-
typedef std::list<cChunkStay *> cChunkStays;
mutable cCriticalSection m_CSChunks;
/** A map of chunk coordinates to chunks.
Uses a map (as opposed to unordered_map) because sorted maps are apparently faster. */
- std::map<ChunkCoordinate, cChunk, ChunkCoordinate::Comparer> m_Chunks;
+ std::map<cChunkCoords, cChunk> m_Chunks;
cEvent m_evtChunkValid; // Set whenever any chunk becomes valid, via ChunkValidated()