From 87a9979c8938b800aab6e35903d60d24892e7f2e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 19 Oct 2017 17:18:17 +0200 Subject: overload std::hash for OUString and OString no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins Reviewed-by: Noel Grandin --- stoc/source/corereflection/base.hxx | 6 ++---- stoc/source/inspect/introspection.cxx | 6 ++---- stoc/source/namingservice/namingservice.cxx | 7 +------ stoc/source/security/file_policy.cxx | 2 +- stoc/source/servicemanager/servicemanager.cxx | 9 +++------ 5 files changed, 9 insertions(+), 21 deletions(-) (limited to 'stoc') diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 6638493ad3fa..8c01dd3ddf0c 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -74,10 +74,8 @@ inline bool td_equals( typelib_TypeDescription * pTD, typelib_TypeDescriptionRef rtl_ustr_compare( pTD->pTypeName->buffer, pType->pTypeName->buffer ) == 0)); } -typedef std::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlField >, - OUStringHash > OUString2Field; -typedef std::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlMethod >, - OUStringHash > OUString2Method; +typedef std::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlField > > OUString2Field; +typedef std::unordered_map< OUString, css::uno::WeakReference< css::reflection::XIdlMethod > > OUString2Method; class IdlReflectionServiceImpl diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 3bb086d5ad7d..870a74a9bd55 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -143,8 +143,7 @@ bool isDerivedFrom( const Reference& xToTestClass, const Reference IntrospectionNameMap; @@ -154,8 +153,7 @@ IntrospectionNameMap; typedef std::unordered_map < OUString, - OUString, - OUStringHash + OUString > LowerToExactNameMap; diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 88787b7b5515..5fd2761d041a 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -60,12 +60,7 @@ static OUString ns_getImplementationName() return OUString(IMPLNAME); } -typedef std::unordered_map -< - OUString, - Reference, - OUStringHash -> HashMap_OWString_Interface; +typedef std::unordered_map< OUString, Reference > HashMap_OWString_Interface; class NamingService_Impl diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index 31bdcdbcc7c1..6036f4b46f51 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -63,7 +63,7 @@ class FilePolicy AccessControl m_ac; Sequence< Any > m_defaultPermissions; - typedef std::unordered_map< OUString, Sequence< Any >, OUStringHash > t_permissions; + typedef std::unordered_map< OUString, Sequence< Any > > t_permissions; t_permissions m_userPermissions; bool m_init; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 0c222301cb15..e35ac7427996 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -278,22 +278,19 @@ Any ImplementationEnumeration_Impl::nextElement() *****************************************************************************/ typedef std::unordered_set < - OUString, - OUStringHash + OUString > HashSet_OWString; typedef std::unordered_multimap < OUString, - Reference, - OUStringHash + Reference > HashMultimap_OWString_Interface; typedef std::unordered_map < OUString, - Reference, - OUStringHash + Reference > HashMap_OWString_Interface; /***************************************************************************** -- cgit