fix bad hash function

This commit is contained in:
huanghui 2022-01-06 19:35:20 +08:00
parent cbd18281af
commit d085f99049
1 changed files with 3 additions and 3 deletions

View File

@ -78,16 +78,16 @@ class SymbolicKeyInstance : public Value {
using SymbolicKeyInstancePtr = std::shared_ptr<SymbolicKeyInstance>;
struct SymbolicKeyInstanceHash {
std::size_t operator()(const SymbolicKeyInstancePtr s) const {
std::size_t operator()(const SymbolicKeyInstancePtr &s) const {
if (s == nullptr) {
return 0;
}
return s->abstract()->hash();
return s->hash();
}
};
struct SymbolicKeyInstanceEqual {
bool operator()(const SymbolicKeyInstancePtr lhs, const SymbolicKeyInstancePtr rhs) const {
bool operator()(const SymbolicKeyInstancePtr &lhs, const SymbolicKeyInstancePtr &rhs) const {
if (lhs == nullptr || rhs == nullptr) {
return false;
}