!28656 fix bad hash function

Merge pull request !28656 from huanghui/fix-map-overflow
This commit is contained in:
i-robot 2022-01-11 03:52:23 +00:00 committed by Gitee
commit d094e689f8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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;
}