fix: change ChunkCoords hashing

This commit is contained in:
2022-04-27 19:44:16 +02:00
parent dc8a4ce947
commit 98f73f467d

View File

@@ -29,8 +29,8 @@ struct ChunkCoord {
namespace std {
template <>
struct hash<td::game::ChunkCoord> {
std::size_t operator()(const td::game::ChunkCoord& key) const {
return std::hash<std::int16_t>()(key.x) ^ std::hash<std::int16_t>()(key.y);
std::size_t operator()(const td::game::ChunkCoord& key) const noexcept{
return std::hash<std::int16_t>()(key.x << 16 | key.y);
}
};
}