fix: change ChunkCoords hashing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user