mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 01:41:51 +03:00
ue2_literal: better hash function
This commit is contained in:
committed by
Matthew Barr
parent
1aad3b0ed1
commit
25170b32eb
@@ -205,6 +205,8 @@ public:
|
||||
nocase.swap(other.nocase);
|
||||
}
|
||||
|
||||
size_t hash() const;
|
||||
|
||||
private:
|
||||
friend const_iterator;
|
||||
std::string s;
|
||||
@@ -321,7 +323,7 @@ struct hash<ue2::ue2_literal::elem> {
|
||||
template<>
|
||||
struct hash<ue2::ue2_literal> {
|
||||
size_t operator()(const ue2::ue2_literal &lit) const {
|
||||
return ue2::ue2_hasher()(lit);
|
||||
return lit.hash();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user