diff options
author | Daniel Sikeler <d.sikeler94@gmail.com> | 2014-09-12 06:17:03 +0000 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-18 13:12:48 +0200 |
commit | 32d6415617b5815bb5d18719f6d2df74becc0997 (patch) | |
tree | 55c7b6d7c068bb6eee60aa0a7add60cc6595513b /xmlhelp | |
parent | d311d85a4d501a0bfef20e610169f20de896a167 (diff) |
fdo#83512 Make use of OUStringHash and OStringHash
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.hxx | 51 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/db.hxx | 16 |
2 files changed, 10 insertions, 57 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index 366a914cbc6d..3e798cf1cc5b 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -142,22 +142,6 @@ namespace chelp { { public: - struct eq - { - bool operator()( const OUString& rKey1, const OUString& rKey2 ) const - { - return (rKey1 == rKey2); - } - }; - - struct ha - { - size_t operator()( const OUString& rName ) const - { - return rName.hashCode(); - } - }; - /** * Input is the installdirectory in system dependent notation */ @@ -295,55 +279,37 @@ namespace chelp { std::vector< OUString > m_avModules; - typedef boost::unordered_map< OUString,helpdatafileproxy::Hdf*,ha,eq > DatabasesTable; + typedef boost::unordered_map< OUString,helpdatafileproxy::Hdf*,OUStringHash > DatabasesTable; DatabasesTable m_aDatabases; // Language and module dependent databases - typedef boost::unordered_map< OUString,OUString,ha,eq > LangSetTable; + typedef boost::unordered_map< OUString,OUString,OUStringHash > LangSetTable; LangSetTable m_aLangSet; // Mapping to of lang-country to lang - typedef boost::unordered_map< OUString,StaticModuleInformation*,ha,eq > ModInfoTable; + typedef boost::unordered_map< OUString,StaticModuleInformation*,OUStringHash > ModInfoTable; ModInfoTable m_aModInfo; // Module information - typedef boost::unordered_map< OUString,KeywordInfo*,ha,eq > KeywordInfoTable; + typedef boost::unordered_map< OUString,KeywordInfo*,OUStringHash > KeywordInfoTable; KeywordInfoTable m_aKeywordInfo; // Module information typedef boost::unordered_map< OUString, ::com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >, - ha, - eq > ZipFileTable; + OUStringHash > ZipFileTable; ZipFileTable m_aZipFileTable; // No closing of an once opened jarfile typedef boost::unordered_map< OUString, ::com::sun::star::uno::Reference< com::sun::star::i18n::XCollator >, - ha, - eq > CollatorTable; + OUStringHash > CollatorTable; CollatorTable m_aCollatorTable; - struct ostring_eq - { - bool operator()( const OString& rKey1, const OString& rKey2 ) const - { - return (rKey1 == rKey2); - } - }; - - struct ostring_ha - { - size_t operator()( const OString& rName ) const - { - return rName.hashCode(); - } - }; typedef boost::unordered_set< OString, - ostring_ha, - ostring_eq > EmptyActiveTextSet; + OStringHash > EmptyActiveTextSet; EmptyActiveTextSet m_aEmptyActiveTextSet; // methods @@ -367,8 +333,7 @@ namespace chelp { < OUString, bool, - Databases::ha, - Databases::eq + OUStringHash > ExtensionHelpExistanceMap; diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx index 5d5823c00dea..5b363cfe1596 100644 --- a/xmlhelp/source/cxxhelp/provider/db.hxx +++ b/xmlhelp/source/cxxhelp/provider/db.hxx @@ -62,20 +62,8 @@ namespace helpdatafileproxy { { return m_pBuffer; } }; - struct eq - { - bool operator()( const OString& rKey1, const OString& rKey2 ) const - { return (rKey1 == rKey2); } - }; - - struct ha - { - size_t operator()( const OString& rName ) const - { return rName.hashCode(); } - }; - - typedef boost::unordered_map< OString,std::pair<int,int>,ha,eq > StringToValPosMap; - typedef boost::unordered_map< OString,OString,ha,eq > StringToDataMap; + typedef boost::unordered_map< OString,std::pair<int,int>,OStringHash > StringToValPosMap; + typedef boost::unordered_map< OString,OString,OStringHash > StringToDataMap; class Hdf : hdf_internal::Noncopyable { |