diff options
-rw-r--r-- | src/server.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server.h b/src/server.h index 2c21f5dfc..71f692e87 100644 --- a/src/server.h +++ b/src/server.h @@ -425,11 +425,10 @@ private: std::unordered_set<session_t> waiting_players; }; - // the standard library does not implement std::hash for pairs so we have this: + // The standard library does not implement std::hash for pairs so we have this: struct SBCHash { size_t operator() (const std::pair<v3s16, u16> &p) const { - return (((size_t) p.first.X) << 48) | (((size_t) p.first.Y) << 32) | - (((size_t) p.first.Z) << 16) | ((size_t) p.second); + return std::hash<v3s16>()(p.first) ^ p.second; } }; |