From 0b8f11ce95d81b63e6d6a3f34b05a4e99147c6ad Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 11 Feb 2011 12:50:02 +0000 Subject: (std|boost)::hash on a const char* hashes the pointer not the contents --- vcl/source/glyphs/gcach_ftyp.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcl/source/glyphs') diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index e1b9cd849bb3..0539e199905c 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -138,7 +138,8 @@ FT_Error (*pFTOblique)(FT_GlyphSlot); static bool bEnableSizeFT = false; struct EqStr{ bool operator()(const char* a, const char* b) const { return !strcmp(a,b); } }; -typedef ::boost::unordered_map, EqStr> FontFileList; +struct HashStr { size_t operator()( const char* s ) const { return rtl_str_hashCode(s); } }; +typedef ::boost::unordered_map FontFileList; namespace { struct vclFontFileList : public rtl::Static< FontFileList, vclFontFileList > {}; } // ----------------------------------------------------------------------- -- cgit