(std|boost)::hash on a const char* hashes the pointer not the contents

This commit is contained in:
Caolán McNamara 2011-02-11 12:44:51 +00:00
parent 5bd709c6ab
commit 7df76ae885

View file

@ -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;