(std|boost)::hash on a const char* hashes the pointer not the contents
This commit is contained in:
parent
5bd709c6ab
commit
7df76ae885
1 changed files with 1 additions and 4 deletions
|
@ -58,13 +58,10 @@ struct lessByteString{
|
|||
|
||||
struct hashByteString{
|
||||
size_t operator()( const ByteString& rName ) const{
|
||||
boost::hash< const char* > myHash;
|
||||
return myHash( rName.GetBuffer() );
|
||||
return rtl_str_hashCode(rName.GetBuffer());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef boost::unordered_map<ByteString , String , hashByteString,equalByteString>
|
||||
StringHashMap;
|
||||
|
||||
|
|
Loading…
Reference in a new issue