fix: change ChunkCoords hashing
This commit is contained in:
@@ -29,8 +29,8 @@ struct ChunkCoord {
|
|||||||
namespace std {
|
namespace std {
|
||||||
template <>
|
template <>
|
||||||
struct hash<td::game::ChunkCoord> {
|
struct hash<td::game::ChunkCoord> {
|
||||||
std::size_t operator()(const td::game::ChunkCoord& key) const {
|
std::size_t operator()(const td::game::ChunkCoord& key) const noexcept{
|
||||||
return std::hash<std::int16_t>()(key.x) ^ std::hash<std::int16_t>()(key.y);
|
return std::hash<std::int16_t>()(key.x << 16 | key.y);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user