diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-10 16:43:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 12:38:32 +0200 |
commit | d347c2403605c5aa3ddd98fb605366914acab79f (patch) | |
tree | e39624030741234c514bccd858e69d6318dfba68 /winaccessibility/source | |
parent | f0e68d4feaaa43f7450432ad1ebd92c2b572400f (diff) |
convert std::map::insert to std::map::emplace
which is considerably less verbose
Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'winaccessibility/source')
-rw-r--r-- | winaccessibility/source/UAccCOM/MAccessible.cxx | 2 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 2 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index f800508eff88..1cf370976cdb 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2616,7 +2616,7 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, REFIID iid, void** ppvObject) assert(hr == S_OK); if(hr == S_OK) { - m_containedObjects.insert(XGUIDToComObjHash::value_type(*pMap->piid,static_cast<IUnknown*>(*ppvObject))); + m_containedObjects.emplace(*pMap->piid, static_cast<IUnknown*>(*ppvObject)); IUNOXWrapper* wrapper = nullptr; static_cast<IUnknown*>(*ppvObject)->QueryInterface(IID_IUNOXWrapper, reinterpret_cast<void**>(&wrapper)); if(wrapper) diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 1ac198ea89f4..0eda5f73e0c7 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -1051,7 +1051,7 @@ bool AccObject:: UpdateAccessibleInfoFromUnoToMSAA ( ) */ void AccObject::AddSelect( long index, AccObject* accObj) { - m_selectionList.insert(IAccSelectionList::value_type(index,accObj)); + m_selectionList.emplace(index,accObj); } IAccSelectionList& AccObject::GetSelection() diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 2e97c62f2835..cc6a76de5cdc 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -718,7 +718,7 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX { XHWNDDocList.erase( aIter ); } - XHWNDDocList.insert( XHWNDToDocumentHash::value_type(pWnd, pXAcc) ); + XHWNDDocList.emplace( pWnd, pXAcc ); } //end of file name @@ -736,9 +736,9 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX else return false; - XIdAccList.insert( XIdToAccObjHash::value_type( pXAcc, pObj )); + XIdAccList.emplace(pXAcc, pObj); XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( pXAcc ); - XResIdAccList.insert(XResIdToAccObjHash::value_type(pObj.GetResID(),&(pIndTemp->second))); + XResIdAccList.emplace(pObj.GetResID(),&(pIndTemp->second)); AccObject* pCurObj = GetAccObjByXAcc(pXAcc); if( pCurObj ) @@ -762,7 +762,7 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX */ void AccObjectWinManager::SaveTopWindowHandle(HWND hWnd, css::accessibility::XAccessible* pXAcc) { - HwndXAcc.insert( XHWNDToXAccHash::value_type( hWnd,pXAcc ) ); + HwndXAcc.emplace(hWnd,pXAcc); } |