summaryrefslogtreecommitdiff
path: root/unotools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-17 09:19:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-17 10:08:23 +0100
commitf2be92b68d936c6e9d5e8a96deb1580bcbf8c17f (patch)
tree38c50cace69ddb2e33970a4a540780b51fee82b3 /unotools/source
parentdbf2273e45c8b134b1470ee6173ca260e2545fed (diff)
remove OUStringHashCode in favor of OUStringHash
(and as always if you find one, you can be sure there are 6 others in there when you grep for them) Change-Id: I9296ddbdda266c7b6d8a0ac0bc13ec5b6340cee7
Diffstat (limited to 'unotools/source')
-rw-r--r--unotools/source/config/cmdoptions.cxx13
-rw-r--r--unotools/source/config/extendedsecurityoptions.cxx10
-rw-r--r--unotools/source/config/optionsdlg.cxx10
-rw-r--r--unotools/source/config/pathoptions.cxx12
4 files changed, 6 insertions, 39 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index 116b5d826173..1887cb7daeae 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -46,15 +46,6 @@ using namespace ::com::sun::star::beans ;
#define PROPERTYNAME_CMD OUString("Command")
-// Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map
-struct OUStringHashCode
-{
- size_t operator()( const OUString& sString ) const
- {
- return sString.hashCode();
- }
-};
-
/*-****************************************************************************************************************
@descr support simple command option structures and operations on it
****************************************************************************************************************-*/
@@ -106,9 +97,9 @@ class SvtCmdOptions
}
private:
- class CommandHashMap : public ::boost::unordered_map< OUString ,
+ class CommandHashMap : public ::boost::unordered_map< OUString ,
sal_Int32 ,
- OUStringHashCode ,
+ OUStringHash ,
::std::equal_to< OUString > >
{
public:
diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx
index 8b1d3a1cce3d..ec6f5cc9d13e 100644
--- a/unotools/source/config/extendedsecurityoptions.cxx
+++ b/unotools/source/config/extendedsecurityoptions.cxx
@@ -47,17 +47,9 @@ using namespace ::com::sun::star::uno ;
#define PROPERTYCOUNT 1
-struct OUStringHashCode
-{
- size_t operator()( const OUString& sString ) const
- {
- return sString.hashCode();
- }
-};
-
class ExtensionHashMap : public ::boost::unordered_map< OUString,
sal_Int32,
- OUStringHashCode,
+ OUStringHash,
::std::equal_to< OUString > >
{
public:
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index f204d203fc97..a109eca84c0f 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -46,15 +46,7 @@ static sal_Int32 nRefCount = 0;
class SvtOptionsDlgOptions_Impl : public utl::ConfigItem
{
private:
- struct OUStringHashCode
- {
- size_t operator()( const OUString& sString ) const
- {
- return sString.hashCode();
- }
- };
-
- typedef boost::unordered_map< OUString, sal_Bool, OUStringHashCode, ::std::equal_to< OUString > > OptionNodeList;
+ typedef boost::unordered_map< OUString, sal_Bool, OUStringHash, ::std::equal_to< OUString > > OptionNodeList;
OUString m_sPathDelimiter;
OptionNodeList m_aOptionNodeList;
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 9435505ce1fe..c1899a5efb99 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -67,21 +67,13 @@ using namespace com::sun::star::lang;
#define STRPOS_NOTFOUND -1
-struct OUStringHashCode
-{
- size_t operator()( const OUString& sString ) const
- {
- return sString.hashCode();
- }
-};
-
enum VarNameProperty
{
VAR_NEEDS_SYSTEM_PATH,
VAR_NEEDS_FILEURL
};
-class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHashCode, ::std::equal_to< OUString > >
+class NameToHandleMap : public ::boost::unordered_map< OUString, sal_Int32, OUStringHash, ::std::equal_to< OUString > >
{
public:
inline void free() { NameToHandleMap().swap( *this ); }
@@ -93,7 +85,7 @@ class EnumToHandleMap : public ::boost::unordered_map< sal_Int32, sal_Int32, boo
inline void free() { EnumToHandleMap().swap( *this ); }
};
-class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHashCode, ::std::equal_to< OUString > >
+class VarNameToEnumMap : public ::boost::unordered_map< OUString, VarNameProperty, OUStringHash, ::std::equal_to< OUString > >
{
public:
inline void free() { VarNameToEnumMap().swap( *this ); }