Skip to content

Commit

Permalink
[Vector2] Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jul 29, 2020
1 parent f0285a3 commit c664d11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/gk/core/Vector2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ using Vector2d = Vector2<double>;
template<typename T>
inline void hash_combine(std::size_t &seed, const T &v) {
std::hash<T> hasher;
seed ^= std::hash<T>(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}

} // namespace gk
Expand All @@ -118,8 +118,8 @@ namespace std {
struct hash<gk::Vector2<T>> {
size_t operator()(const gk::Vector2<T> &vector2) const {
size_t hash = 0;
hash_combine(hash, vector2.x);
hash_combine(hash, vector2.y);
gk::hash_combine(hash, vector2.x);
gk::hash_combine(hash, vector2.y);
return hash;
}
};
Expand Down

0 comments on commit c664d11

Please sign in to comment.