diff options
author | Fridrich Strba <fridrich.strba@bluewin.ch> | 2011-02-03 14:05:04 -0700 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-03 22:32:23 +0100 |
commit | 9e7fbf366b72b3dd01af4a4ef0af6d8294a923e0 (patch) | |
tree | 40818781e1d3f0ce258fb2ab150c07a05bf4efc6 /sal/inc | |
parent | 80194d6b139472df2bc49ac77f4c9f3aa21a516d (diff) |
some std::hash_map/set -> boost::unordered_map/set changes
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/osl/diagnose.hxx | 18 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 8 |
2 files changed, 2 insertions, 24 deletions
diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx index 8904e75a2..211eb502f 100644 --- a/sal/inc/osl/diagnose.hxx +++ b/sal/inc/osl/diagnose.hxx @@ -43,7 +43,7 @@ #if ! defined(_RTL_INSTANCE_HXX_) #include "rtl/instance.hxx" #endif -#include <hash_set> +#include <boost/unordered_set.hpp> #include <functional> #include <typeinfo> @@ -96,22 +96,8 @@ 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*, ::std::hash_compare<void const *>, +typedef ::boost::unordered_set<void const*, VoidPtrHash, ::std::equal_to<void const*>, ::rtl::Allocator<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 cbb278bee..b4b8f4c64 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -1550,14 +1550,6 @@ 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 */ |