Kaydet (Commit) 587bd154 authored tarafından Noel Grandin's avatar Noel Grandin

use equal_range instead of lower_bound+upper_bound

Change-Id: I7cc1c95b3a55630e3571cac5fe22be6c2f3a1bc9
Reviewed-on: https://gerrit.libreoffice.org/62015
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 35e80e97
......@@ -160,10 +160,9 @@ void SmartTagMgr::GetActionSequences( std::vector< OUString >& rSmartTagTypes,
Sequence< sal_Int32 > aIndices( nNumberOfActionRefs );
sal_uInt16 i = 0;
auto aActionsIter = maSmartTagMap.lower_bound( rSmartTagType );
auto aEnd = maSmartTagMap.upper_bound( rSmartTagType );
auto iters = maSmartTagMap.equal_range( rSmartTagType );
for ( ; aActionsIter != aEnd; ++aActionsIter )
for ( auto aActionsIter = iters.first; aActionsIter != iters.second; ++aActionsIter )
{
aActions[ i ] = (*aActionsIter).second.mxSmartTagAction;
aIndices[ i++ ] = (*aActionsIter).second.mnSmartTagIndex;
......
......@@ -92,9 +92,8 @@ namespace DOM { namespace events {
TypeListenerMap::const_iterator tIter = rTMap.find(aType);
if (tIter != rTMap.end()) {
ListenerMap const& rMap = tIter->second;
auto iter = rMap.lower_bound(pNode);
auto const ibound = rMap.upper_bound(pNode);
for( ; iter != ibound; ++iter )
auto iterRange = rMap.equal_range(pNode);
for( auto iter = iterRange.first; iter != iterRange.second; ++iter )
{
if(iter->second.is())
(iter->second)->handleEvent(xEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment