diff options
author | Herbert Dürr <hdu@apache.org> | 2013-05-08 15:17:19 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2013-05-08 15:17:19 +0000 |
commit | b7e3470a154538a92f0a21b14e726d75723f4a92 (patch) | |
tree | 3675cccb7f6100e77ff0d21e4167f3d92e84f194 /xmloff | |
parent | f44ca372a2a88f996366e5cb44842ef79dd9df6e (diff) |
#i122208# use rtl::CStringHash and rtl::CStringEqual instead of relying on pre-tr1-stl specializations
In stlport<=4 the functors hash and equal_to had specializions for conveniently handling c-strings.
For consistency reasons this specialization was not included in the TR1 report and the C++11 standard.
The two new helper functors are drop-in replacements for the old specializations.
Notes
Notes:
merged as: 1857688e1f4ba982d147a9cac69fad948361d1c0
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/EnhancedCustomShapeToken.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index e816f37dd671..4012b495e36b 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx @@ -26,18 +26,11 @@ #include "EnhancedCustomShapeToken.hxx" #include <osl/mutex.hxx> #include <hash_map> -#include <string.h> +#include <rtl/string.hxx> namespace xmloff { namespace EnhancedCustomShapeToken { -struct TCheck -{ - bool operator()( const char* s1, const char* s2 ) const - { - return strcmp( s1, s2 ) == 0; - } -}; -typedef std::hash_map< const char*, EnhancedCustomShapeTokenEnum, std::hash<const char*>, TCheck> TypeNameHashMap; +typedef std::hash_map< const char*, EnhancedCustomShapeTokenEnum, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap; static TypeNameHashMap* pHashMap = NULL; static ::osl::Mutex& getHashMapMutex() { |