diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-19 17:18:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-23 08:15:35 +0200 |
commit | 87a9979c8938b800aab6e35903d60d24892e7f2e (patch) | |
tree | 6beb01f22537e63df24c023ab65d391a7bee0cf6 /sc/source/core | |
parent | d76c4e5c9aaf8bd27ec97679bcaeba5b18aca493 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/inc/cellkeytranslator.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/formulaparserpool.cxx | 3 |
6 files changed, 9 insertions, 10 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index dd0dc4afa663..51c7b4083c7f 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -334,7 +334,7 @@ struct InitDocData mbTailEmptyRows(false) {} }; -typedef std::unordered_set<OUString, OUStringHash> LabelSet; +typedef std::unordered_set<OUString> LabelSet; class InsertLabel { diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 5ca9e8d4670f..7b6ed9d18b32 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -659,9 +659,9 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_HAS_HIDDEN_MEMBER, bHasHiddenMember); } -void ScDPSaveDimension::UpdateMemberVisibility(const std::unordered_map<OUString, bool, OUStringHash>& rData) +void ScDPSaveDimension::UpdateMemberVisibility(const std::unordered_map<OUString, bool>& rData) { - typedef std::unordered_map<OUString, bool, OUStringHash> DataMap; + typedef std::unordered_map<OUString, bool> DataMap; MemberList::iterator itrMem = maMemberList.begin(), itrMemEnd = maMemberList.end(); for (; itrMem != itrMemEnd; ++itrMem) { @@ -1292,7 +1292,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) return; // First, build a dimension name-to-index map. - typedef std::unordered_map<OUString, long, OUStringHash> NameIndexMap; + typedef std::unordered_map<OUString, long> NameIndexMap; NameIndexMap aMap; long nColCount = pData->GetColumnCount(); for (long i = 0; i < nColCount; ++i) @@ -1334,7 +1334,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData) void ScDPSaveData::SyncAllDimensionMembers(ScDPTableData* pData) { - typedef std::unordered_map<OUString, long, OUStringHash> NameIndexMap; + typedef std::unordered_map<OUString, long> NameIndexMap; // First, build a dimension name-to-index map. NameIndexMap aMap; diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 0d7a0af4de3f..696ddfb3025a 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -3912,7 +3912,7 @@ void ScDPResultVisibilityData::addVisibleMember(const OUString& rDimName, const void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criterion>& rFilters) const { - typedef std::unordered_map<OUString, long, OUStringHash> FieldNameMapType; + typedef std::unordered_map<OUString, long> FieldNameMapType; FieldNameMapType aFieldNames; ScDPTableData* pData = mpSource->GetData(); long nColumnCount = pData->GetColumnCount(); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 0a036d3db171..f58a453a64a1 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2985,7 +2985,7 @@ void lcl_PrepareQuery( const ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPar SCSIZE ScTable::Query(const ScQueryParam& rParamOrg, bool bKeepSub) { ScQueryParam aParam( rParamOrg ); - typedef std::unordered_set<OUString, OUStringHash> StrSetType; + typedef std::unordered_set<OUString> StrSetType; StrSetType aStrSet; bool bStarted = false; diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index 655b9aa792e3..9bfa9a25bd72 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -40,7 +40,7 @@ struct ScCellKeyword ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const css::lang::Locale& rLocale); }; -typedef std::unordered_map< OUString, ::std::list<ScCellKeyword>, OUStringHash > ScCellKeywordHashMap; +typedef std::unordered_map< OUString, ::std::list<ScCellKeyword> > ScCellKeywordHashMap; /** Translate cell function keywords. diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx index e86d7aa2317e..1cfab3575be7 100644 --- a/sc/source/core/tool/formulaparserpool.cxx +++ b/sc/source/core/tool/formulaparserpool.cxx @@ -46,8 +46,7 @@ public: private: typedef std::unordered_map< - OUString, Reference< XSingleComponentFactory >, - OUStringHash > FactoryMap; + OUString, Reference< XSingleComponentFactory > > FactoryMap; Reference< XComponentContext > mxContext; /// Global component context. FactoryMap maFactories; /// All parser factories, mapped by formula namespace. |