[Libreoffice] hash and char * hashes the pointer not the string

Caolán McNamara caolanm at redhat.com
Fri Feb 11 04:58:54 PST 2011

boost::hash (and I think std::hash in c++0x at least) with
hash<const char*>(str) will hash the *pointer* str, not the
contents of str.

Which is why fontwork disappeared recently for me. So I've now greped
for and fixed any hash with a char* and fixed them to use
rtl_str_hashCode which does a hash on the contents.


More information about the LibreOffice mailing list