diff options
author | Mattes D <github@xoft.cz> | 2014-12-24 07:32:31 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-24 07:32:31 +0100 |
commit | 9c5463be1e090ff65acdc0c0571788f60ad76478 (patch) | |
tree | d7ad8079d6fcd80a2c1ce22b05c347441529a2e3 /src | |
parent | Refactored all player block placing to go through hooks. (diff) | |
download | cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar.gz cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar.bz2 cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar.lz cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar.xz cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.tar.zst cuberite-9c5463be1e090ff65acdc0c0571788f60ad76478.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkDef.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h index b62656a58..959841ecc 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -399,9 +399,12 @@ public: typedef std::list<cChunkCoords> cChunkCoordsList; typedef std::vector<cChunkCoords> cChunkCoordsVector; +namespace std +{ + /** A simple hash function for chunk coords, we assume that chunk coords won't use more than 16 bits, so the hash is almost an identity. Used for std::unordered_map<cChunkCoords, ...> */ -template<> struct std::hash<cChunkCoords> +template<> struct hash<cChunkCoords> { size_t operator ()(const cChunkCoords & a_Coords) { @@ -409,6 +412,8 @@ template<> struct std::hash<cChunkCoords> } }; +} // namespace std + |