Compare commits

..

2 commits

Author SHA1 Message Date
Justin
653da7380b
Merge a68a631a4d into d68e358bdd 2024-10-17 19:29:22 +03:00
dankmeme01
d68e358bdd fix infinite recursion in weakref hash
Some checks failed
Build Binaries / Build Windows (push) Has been cancelled
Build Binaries / Build macOS (push) Has been cancelled
Build Binaries / Build Android (64-bit) (push) Has been cancelled
Build Binaries / Build Android (32-bit) (push) Has been cancelled
Build Binaries / Publish (push) Has been cancelled
2024-10-17 16:23:55 +02:00

View file

@ -971,7 +971,8 @@ namespace std {
template <typename T>
struct std::hash<geode::WeakRef<T>> {
size_t operator()(geode::WeakRef<T> const& ref) const {
return hash{}(ref.m_controller);
// the explicit template argument is needed here because it would otherwise cast to WeakRef and recurse
return hash<std::shared_ptr<geode::WeakRefController>>{}(ref.m_controller);
}
};
}