summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorFridrich Strba <fridrich.strba@bluewin.ch>2011-02-03 02:29:46 -0700
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-03 10:33:49 +0100
commit1c17bf61a59042ca35db73e264558ce211265562 (patch)
tree0d3ac11c478707f8285f805997b679386eb59fec /sal/inc
parent8a91eee9c3a42917584f74ac62a46336488811c9 (diff)
include MSVC STL code path
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/osl/diagnose.hxx13
-rw-r--r--sal/inc/rtl/ustring.hxx8
2 files changed, 21 insertions, 0 deletions
diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx
index 585adf2c30bb..de4795a5233c 100644
--- a/sal/inc/osl/diagnose.hxx
+++ b/sal/inc/osl/diagnose.hxx
@@ -96,8 +96,21 @@ struct VoidPtrHash : ::std::unary_function<void const*, ::std::size_t> {
}
};
+#ifdef USE_MSVC_HASH_SET
+namespace stdext
+{
+ inline ::std::size_t hash_value( void const* p ) {
+ ::std::size_t const d = static_cast< ::std::size_t >(
+ reinterpret_cast< ::std::ptrdiff_t >(p) );
+ return d + (d >> 3);
+ }
+}
+
+typedef ::std::hash_set<void const*> VoidPointerSet;
+#else
typedef ::std::hash_set<void const*, VoidPtrHash, ::std::equal_to<void const*>,
::rtl::Allocator<void const*> > VoidPointerSet;
+#endif
struct ObjectRegistryData {
ObjectRegistryData( ::std::type_info const& rTypeInfo )
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index 6860b7c55c9a..1024cc8f23e7 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1550,6 +1550,14 @@ inline OString OUStringToOString( const OUString & rUnicode,
} /* Namespace */
+namespace stdext
+{
+ inline size_t hash_value(const rtl::OUString &rString)
+ {
+ return rtl::OUStringHash()(rString);
+ }
+}
+
#endif /* __cplusplus */
#endif /* _RTL_USTRING_HXX */