From 9c5463be1e090ff65acdc0c0571788f60ad76478 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 24 Dec 2014 07:32:31 +0100 Subject: gcc compilation fix. --- src/ChunkDef.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 cChunkCoordsList; typedef std::vector 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 */ -template<> struct std::hash +template<> struct hash { size_t operator ()(const cChunkCoords & a_Coords) { @@ -409,6 +412,8 @@ template<> struct std::hash } }; +} // namespace std + -- cgit v1.2.3